3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-26 02:50:06 +01:00

[Forge] Update to latest forge for keyevent fixes

Dieser Commit ist enthalten in:
Kenzie Togami 2019-04-17 00:15:05 -07:00
Ursprung 99da55dc94
Commit 477e78bd17
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 5D200B325E157A81
3 geänderte Dateien mit 4 neuen und 14 gelöschten Zeilen

Datei anzeigen

@ -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 = {

Datei anzeigen

@ -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));
} }
} }

Datei anzeigen

@ -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;
// });
} }
} }