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

View File

@ -22,9 +22,9 @@ package com.sk89q.worldedit.forge;
import com.sk89q.worldedit.forge.gui.GuiReferenceCard; import com.sk89q.worldedit.forge.gui.GuiReferenceCard;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.settings.KeyBinding; import net.minecraft.client.settings.KeyBinding;
import net.minecraftforge.client.event.InputEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.client.registry.ClientRegistry; import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.common.gameevent.InputEvent.KeyInputEvent;
import org.lwjgl.glfw.GLFW; import org.lwjgl.glfw.GLFW;
public class KeyHandler { public class KeyHandler {
@ -37,11 +37,9 @@ public class KeyHandler {
} }
@SubscribeEvent @SubscribeEvent
public void onKey(KeyInputEvent evt) { public void onKey(InputEvent.KeyInputEvent evt) {
if (mc.player != null && mc.world != null && mainKey.isPressed()) { if (mc.player != null && mc.world != null && mainKey.isPressed()) {
mc.displayGuiScreen(new GuiReferenceCard()); 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) @OnlyIn(Dist.DEDICATED_SERVER)
public class ServerProxy implements CommonProxy { public class ServerProxy implements CommonProxy {
// public static ResourceLocation REFERENCE_GUI = new ResourceLocation("worldedit", "resource_gui");
@Override @Override
public void registerHandlers() { public void registerHandlers() {
// ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.GUIFACTORY, () -> openContainer -> {
// if (openContainer.getId().equals(REFERENCE_GUI)) {
// return new GuiReferenceCard();
// }
// return null;
// });
} }
} }