aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/makamys/neodymium/Constants.java2
-rw-r--r--src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java6
-rw-r--r--src/main/java/makamys/neodymium/mixin/MixinWorldRenderer.java5
3 files changed, 10 insertions, 3 deletions
diff --git a/src/main/java/makamys/neodymium/Constants.java b/src/main/java/makamys/neodymium/Constants.java
index 47ea8c6..02482bd 100644
--- a/src/main/java/makamys/neodymium/Constants.java
+++ b/src/main/java/makamys/neodymium/Constants.java
@@ -11,4 +11,6 @@ public class Constants {
public static final String PROTOCOL = "neodymiumvirtualjar";
+ public static final boolean KEEP_RENDER_LIST_LOGIC = Boolean.parseBoolean(System.getProperty("neodymium.keepRenderListLogic", "false"));
+
}
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();
}