diff options
author | makamys <makamys@outlook.com> | 2022-06-24 03:15:32 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2022-06-24 03:18:59 +0200 |
commit | 764b5f78e45faed5542180c1d7f48d58abd21069 (patch) | |
tree | 783564ba02fde68d3caf3ce4097780918241fb62 /src/main | |
parent | 00753d2ed1174ffee13f25e548cd4b70536017f4 (diff) | |
download | Neodymium-764b5f78e45faed5542180c1d7f48d58abd21069.tar.gz Neodymium-764b5f78e45faed5542180c1d7f48d58abd21069.tar.bz2 Neodymium-764b5f78e45faed5542180c1d7f48d58abd21069.zip |
Add keybind for reloading renderers
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/makamys/neodymium/renderer/NeoRenderer.java | 8 |
1 files changed, 7 insertions, 1 deletions
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); |