aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2022-06-30 17:12:15 +0200
committermakamys <makamys@outlook.com>2022-06-30 17:12:15 +0200
commitcb1270c7430c42df644ddbb4a6a96b5807bbedec (patch)
treea4e33b5ee985c963853a1fcfb49ffd110ed25eca /src
parent33162cb3ecbd8ad26cd6b363854d92c63a5e5f91 (diff)
downloadNeodymium-cb1270c7430c42df644ddbb4a6a96b5807bbedec.tar.gz
Neodymium-cb1270c7430c42df644ddbb4a6a96b5807bbedec.tar.bz2
Neodymium-cb1270c7430c42df644ddbb4a6a96b5807bbedec.zip
Fix not getting enabled when shaders are turned off in-game
Diffstat (limited to 'src')
-rw-r--r--src/main/java/makamys/neodymium/Neodymium.java6
-rw-r--r--src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/makamys/neodymium/Neodymium.java b/src/main/java/makamys/neodymium/Neodymium.java
index 932e33f..7573dd1 100644
--- a/src/main/java/makamys/neodymium/Neodymium.java
+++ b/src/main/java/makamys/neodymium/Neodymium.java
@@ -222,8 +222,10 @@ public class Neodymium
}
public static void destroyRenderer() {
- renderer.destroy();
- renderer = null;
+ if(renderer != null) {
+ renderer.destroy();
+ renderer = null;
+ }
rendererWorld = null;
}
diff --git a/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java b/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java
index a059e8e..51cc52a 100644
--- a/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java
+++ b/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java
@@ -39,9 +39,7 @@ abstract class MixinRenderGlobal {
@Inject(method = "loadRenderers", at = @At(value = "HEAD"))
public void preLoadRenderers(CallbackInfo ci) {
- if(Neodymium.isActive()) {
- Neodymium.destroyRenderer();
- }
+ Neodymium.destroyRenderer();
}
@Inject(method = "updateRenderers", at = @At(value = "RETURN"))