From dd48ea423b4d511a3cf4007ca36ec5e5e0e57dde Mon Sep 17 00:00:00 2001 From: itsloley <56316903+itsloley@users.noreply.github.com> Date: Sun, 28 Apr 2024 10:43:58 -0400 Subject: [PATCH] fixes #548 (#608) --- src/main/java/net/coderbot/iris/Iris.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/coderbot/iris/Iris.java b/src/main/java/net/coderbot/iris/Iris.java index 216b8be75a..85b8d536db 100644 --- a/src/main/java/net/coderbot/iris/Iris.java +++ b/src/main/java/net/coderbot/iris/Iris.java @@ -92,10 +92,11 @@ public class Iris { private static PipelineManager pipelineManager; private static IrisConfig irisConfig; private static FileSystem zipFileSystem; - private static final KeyMapping reloadKeybind = new KeyMapping("iris.keybind.reload", InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_R, "iris.keybinds"); - private static final KeyMapping toggleShadersKeybind = new KeyMapping("iris.keybind.toggleShaders", InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_K, "iris.keybinds"); - private static final KeyMapping shaderpackScreenKeybind = new KeyMapping("iris.keybind.shaderPackSelection", InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_O, "iris.keybinds"); - private static final KeyMapping wireframeKeybind = new KeyMapping("iris.keybind.wireframe", InputConstants.Type.KEYSYM, InputConstants.UNKNOWN.getValue(), "iris.keybinds"); + + private static KeyMapping reloadKeybind; + private static KeyMapping toggleShadersKeybind; + private static KeyMapping shaderpackScreenKeybind; + private static KeyMapping wireframeKeybind; private static final Map shaderPackOptionQueue = new HashMap<>(); // Flag variable used when reloading @@ -132,6 +133,11 @@ public Iris() { *

This is called right before options are loaded, so we can add key bindings here.

*/ public static void onEarlyInitialize() { + reloadKeybind = new KeyMapping("iris.keybind.reload", InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_R, "iris.keybinds"); + toggleShadersKeybind = new KeyMapping("iris.keybind.toggleShaders", InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_K, "iris.keybinds"); + shaderpackScreenKeybind = new KeyMapping("iris.keybind.shaderPackSelection", InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_O, "iris.keybinds"); + wireframeKeybind = new KeyMapping("iris.keybind.wireframe", InputConstants.Type.KEYSYM, InputConstants.UNKNOWN.getValue(), "iris.keybinds"); + try { if (!Files.exists(getShaderpacksDirectory())) { Files.createDirectories(getShaderpacksDirectory());