diff options
Diffstat (limited to 'src/main/java/makamys/lodmod/mixin/MixinRenderGlobal.java')
-rw-r--r-- | src/main/java/makamys/lodmod/mixin/MixinRenderGlobal.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main/java/makamys/lodmod/mixin/MixinRenderGlobal.java b/src/main/java/makamys/lodmod/mixin/MixinRenderGlobal.java new file mode 100644 index 0000000..f2b89fd --- /dev/null +++ b/src/main/java/makamys/lodmod/mixin/MixinRenderGlobal.java @@ -0,0 +1,19 @@ +package makamys.lodmod.mixin; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Redirect; + +import makamys.lodmod.renderer.MyRenderer; +import net.minecraft.client.renderer.RenderGlobal; + +@Mixin(RenderGlobal.class) +abstract class MixinRenderGlobal { + + @Redirect(method = "renderSortedRenderers", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/RenderGlobal;renderAllRenderLists(ID)V")) + private void redirectRenderAllRenderLists(RenderGlobal thiz, int p1, double p2) { + if(MyRenderer.renderWorld) { + thiz.renderAllRenderLists(p1, p2); + } + } +} |