diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java b/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java index 51cc52a..3eed7b2 100644 --- a/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java +++ b/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java @@ -23,10 +23,10 @@ abstract class MixinRenderGlobal { private boolean nd$isInsideUpdateRenderers; - @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(Neodymium.shouldRenderVanillaWorld()) { - thiz.renderAllRenderLists(p1, p2); + @Inject(method = "renderAllRenderLists", at = @At(value = "HEAD"), cancellable = true) + private void preRenderAllRenderLists(int p1, double p2, CallbackInfo ci) { + if(!Neodymium.shouldRenderVanillaWorld()) { + ci.cancel(); } } |