From 764b5f78e45faed5542180c1d7f48d58abd21069 Mon Sep 17 00:00:00 2001 From: makamys Date: Fri, 24 Jun 2022 03:15:32 +0200 Subject: Add keybind for reloading renderers --- src/main/java/makamys/neodymium/renderer/NeoRenderer.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/makamys/neodymium/renderer/NeoRenderer.java b/src/main/java/makamys/neodymium/renderer/NeoRenderer.java index 70f3b18..995c835 100644 --- a/src/main/java/makamys/neodymium/renderer/NeoRenderer.java +++ b/src/main/java/makamys/neodymium/renderer/NeoRenderer.java @@ -55,8 +55,9 @@ public class NeoRenderer { public boolean hasInited = false; public boolean destroyPending; + public boolean reloadPending; - private boolean[] wasDown = new boolean[256]; + private static boolean[] wasDown = new boolean[256]; private int renderQuads = 0; public boolean renderWorld; @@ -173,6 +174,8 @@ public class NeoRenderer { destroy(); Neodymium.renderer = null; return; + } else if(reloadPending) { + Minecraft.getMinecraft().renderGlobal.loadRenderers(); } if(showMemoryDebugger && mem != null) { GuiHelper.begin(); @@ -317,6 +320,9 @@ public class NeoRenderer { if(Keyboard.isKeyDown(Keyboard.KEY_P) && !wasDown[Keyboard.KEY_P]) { Util.dumpTexture(); } + if(Keyboard.isKeyDown(Keyboard.KEY_LEFT) && !wasDown[Keyboard.KEY_LEFT]) { + reloadPending = true; + } } for(int i = 0; i < 256; i++) { wasDown[i] = Keyboard.isKeyDown(i); -- cgit