Skip to content

Commit

Permalink
[Forge] Update to latest forge for keyevent fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
octylFractal committed Apr 17, 2019
1 parent 99da55d commit 477e78b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
4 changes: 2 additions & 2 deletions worldedit-forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
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 {
Expand All @@ -37,11 +37,9 @@ public 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));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,8 @@
@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;
// });
}

}

0 comments on commit 477e78b

Please sign in to comment.