geforkt von Mirrors/FastAsyncWorldEdit
[Forge] Update to latest forge for keyevent fixes
Dieser Commit ist enthalten in:
Ursprung
99da55dc94
Commit
477e78bd17
@ -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 = {
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
// });
|
||||
}
|
||||
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren