From 12929d1e234348edf830d1c94d48662396dfdb64 Mon Sep 17 00:00:00 2001 From: "Carson M." Date: Sun, 21 Jan 2024 10:55:29 -0600 Subject: [PATCH] refactor: use glfw constants everywhere --- .../pyke/vitri/finorza/inference/mixin/input/ScreenMixin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/pyke/vitri/finorza/inference/mixin/input/ScreenMixin.java b/src/main/java/io/pyke/vitri/finorza/inference/mixin/input/ScreenMixin.java index 9230f0a..931c47c 100644 --- a/src/main/java/io/pyke/vitri/finorza/inference/mixin/input/ScreenMixin.java +++ b/src/main/java/io/pyke/vitri/finorza/inference/mixin/input/ScreenMixin.java @@ -3,6 +3,7 @@ import io.pyke.vitri.finorza.inference.api.KeyboardHandlerAccessor; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.screens.Screen; +import org.lwjgl.glfw.GLFW; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; @@ -11,6 +12,6 @@ public class ScreenMixin { @Overwrite // need this override for container GUIs public static boolean hasShiftDown() { final KeyboardHandlerAccessor handler = ((KeyboardHandlerAccessor) Minecraft.getInstance().keyboardHandler); - return handler.vitri$isKeyPressed(340) || handler.vitri$isKeyPressed(344); + return handler.vitri$isKeyPressed(GLFW.GLFW_KEY_LEFT_SHIFT) || handler.vitri$isKeyPressed(GLFW.GLFW_KEY_RIGHT_SHIFT); } }