aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/makamys/lodmod
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2021-05-08 19:38:27 +0200
committermakamys <makamys@outlook.com>2021-05-08 19:38:27 +0200
commit827be36ba244c173bab239ec7fde57ea177b1177 (patch)
treef44f4d24f2f1ce24c130c6d758b940bc2197f209 /src/main/java/makamys/lodmod
parent59f7e189fa351901ac94142176b7854686163e1a (diff)
downloadNeodymium-827be36ba244c173bab239ec7fde57ea177b1177.tar.gz
Neodymium-827be36ba244c173bab239ec7fde57ea177b1177.tar.bz2
Neodymium-827be36ba244c173bab239ec7fde57ea177b1177.zip
add an isActive check
Diffstat (limited to 'src/main/java/makamys/lodmod')
-rw-r--r--src/main/java/makamys/lodmod/mixin/MixinRenderGlobal.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/makamys/lodmod/mixin/MixinRenderGlobal.java b/src/main/java/makamys/lodmod/mixin/MixinRenderGlobal.java
index 0f87216..a2acecf 100644
--- a/src/main/java/makamys/lodmod/mixin/MixinRenderGlobal.java
+++ b/src/main/java/makamys/lodmod/mixin/MixinRenderGlobal.java
@@ -21,8 +21,10 @@ abstract class MixinRenderGlobal {
@Redirect(method = "renderSortedRenderers", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/WorldRenderer;getGLCallListForPass(I)I"))
public int redirectCallList(WorldRenderer thiz, int arg) {
int numba = thiz.getGLCallListForPass(arg);
- if(numba != -1) {
- LODMod.renderer.onWorldRendererFrustumChange(thiz, true);
+ if(LODMod.isActive()) {
+ if(numba != -1) {
+ LODMod.renderer.onWorldRendererFrustumChange(thiz, true);
+ }
}
return numba;
}