diff options
author | makamys <makamys@outlook.com> | 2024-01-20 13:16:36 +0100 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2024-01-20 13:18:12 +0100 |
commit | 7da5fb9ed13688800e3ffd52f1dddeaba6d997cf (patch) | |
tree | 4038d477663d434d9f026ec998b6a75342baf1a9 /src/main/java/makamys/neodymium/mixin | |
parent | 1cc374fdbefc26e709db213b439c8a7961d55d1e (diff) | |
download | Neodymium-7da5fb9ed13688800e3ffd52f1dddeaba6d997cf.tar.gz Neodymium-7da5fb9ed13688800e3ffd52f1dddeaba6d997cf.tar.bz2 Neodymium-7da5fb9ed13688800e3ffd52f1dddeaba6d997cf.zip |
Add JVM flag to keep running render list logic
Fixes Hodgepodge incompat (#44), but there's probably a better way
Diffstat (limited to 'src/main/java/makamys/neodymium/mixin')
-rw-r--r-- | src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java | 6 | ||||
-rw-r--r-- | src/main/java/makamys/neodymium/mixin/MixinWorldRenderer.java | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java b/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java index c430bf6..76593b0 100644 --- a/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java +++ b/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java @@ -9,6 +9,7 @@ import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; +import makamys.neodymium.Constants; import makamys.neodymium.Neodymium; import net.minecraft.client.renderer.RenderGlobal; import net.minecraft.client.renderer.WorldRenderer; @@ -39,7 +40,10 @@ abstract class MixinRenderGlobal { require = 1) public void preRenderSortedRenderers(int startRenderer, int numRenderers, int renderPass, double partialTickTime, CallbackInfoReturnable<Integer> cir) { if(Neodymium.isActive()) { - cir.setReturnValue(Neodymium.renderer.preRenderSortedRenderers(renderPass, partialTickTime, sortedWorldRenderers)); + int updated = Neodymium.renderer.preRenderSortedRenderers(renderPass, partialTickTime, sortedWorldRenderers); + if(!Constants.KEEP_RENDER_LIST_LOGIC) { + cir.setReturnValue(updated); + } } } diff --git a/src/main/java/makamys/neodymium/mixin/MixinWorldRenderer.java b/src/main/java/makamys/neodymium/mixin/MixinWorldRenderer.java index be3cadd..fe6e999 100644 --- a/src/main/java/makamys/neodymium/mixin/MixinWorldRenderer.java +++ b/src/main/java/makamys/neodymium/mixin/MixinWorldRenderer.java @@ -2,6 +2,7 @@ package makamys.neodymium.mixin; import com.google.common.collect.Lists; import makamys.neodymium.Compat; +import makamys.neodymium.Constants; import makamys.neodymium.Neodymium; import makamys.neodymium.ducks.ITessellator; import makamys.neodymium.ducks.IWorldRenderer; @@ -109,7 +110,7 @@ abstract class MixinWorldRenderer implements IWorldRenderer { target = "Lorg/lwjgl/opengl/GL11;glNewList(II)V"), require = 1) private void noNewList(int list, int mode) { - if (!Neodymium.isActive()) { + if (!Neodymium.isActive() || Constants.KEEP_RENDER_LIST_LOGIC) { GL11.glNewList(list, mode); } } @@ -119,7 +120,7 @@ abstract class MixinWorldRenderer implements IWorldRenderer { target = "Lorg/lwjgl/opengl/GL11;glEndList()V"), require = 1) private void noEndList() { - if (!Neodymium.isActive()) + if (!Neodymium.isActive() || Constants.KEEP_RENDER_LIST_LOGIC) GL11.glEndList(); } |