[Forge] Update to latest forge for keyevent fixes

This commit is contained in:
Kenzie Togami 2019-04-17 00:15:05 -07:00
parent 99da55dc94
commit 477e78bd17
No known key found for this signature in database
GPG Key ID: 5D200B325E157A81
3 changed files with 4 additions and 14 deletions

View File

@ -14,7 +14,7 @@ buildscript {
apply plugin: 'net.minecraftforge.gradle'
def minecraftVersion = "1.13.2"
def forgeVersion = "25.0.76"
def forgeVersion = "25.0.146"
dependencies {
compile project(':worldedit-core')
@ -29,7 +29,7 @@ sourceCompatibility = 1.8
targetCompatibility = 1.8
minecraft {
mappings channel: 'snapshot', version: '20190311-1.13.2'
mappings channel: 'snapshot', version: '20190415-1.13.2'
runs {
client = {

View File

@ -22,9 +22,9 @@ package com.sk89q.worldedit.forge;
import com.sk89q.worldedit.forge.gui.GuiReferenceCard;
import net.minecraft.client.Minecraft;
import net.minecraft.client.settings.KeyBinding;
import net.minecraftforge.client.event.InputEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.common.gameevent.InputEvent.KeyInputEvent;
import org.lwjgl.glfw.GLFW;
public class KeyHandler {
@ -37,11 +37,9 @@ public class KeyHandler {
}
@SubscribeEvent
public void onKey(KeyInputEvent evt) {
public void onKey(InputEvent.KeyInputEvent evt) {
if (mc.player != null && mc.world != null && mainKey.isPressed()) {
mc.displayGuiScreen(new GuiReferenceCard());
// TODO Seems GuiHandlers don't work on client right now
// NetworkHooks.openGui(mc.player, new ResourceLocationInteractionObject(ServerProxy.REFERENCE_GUI));
}
}

View File

@ -25,16 +25,8 @@ import net.minecraftforge.api.distmarker.OnlyIn;
@OnlyIn(Dist.DEDICATED_SERVER)
public class ServerProxy implements CommonProxy {
// public static ResourceLocation REFERENCE_GUI = new ResourceLocation("worldedit", "resource_gui");
@Override
public void registerHandlers() {
// ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.GUIFACTORY, () -> openContainer -> {
// if (openContainer.getId().equals(REFERENCE_GUI)) {
// return new GuiReferenceCard();
// }
// return null;
// });
}
}