From 827be36ba244c173bab239ec7fde57ea177b1177 Mon Sep 17 00:00:00 2001 From: makamys Date: Sat, 8 May 2021 19:38:27 +0200 Subject: add an isActive check --- src/main/java/makamys/lodmod/mixin/MixinRenderGlobal.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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; } -- cgit