aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/makamys/lodmod/mixin/MixinRenderGlobal.java
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2021-05-07 08:42:32 +0200
committermakamys <makamys@outlook.com>2021-05-07 08:42:32 +0200
commitc233ea31da07957d8872d3859d6e75b99937becd (patch)
treeb9d4301b7b503aa466d4af2db8498918f3e6dfee /src/main/java/makamys/lodmod/mixin/MixinRenderGlobal.java
parentbc6c84d2d2342073b6f4d1b8c1213b7102bb7ebf (diff)
downloadNeodymium-c233ea31da07957d8872d3859d6e75b99937becd.tar.gz
Neodymium-c233ea31da07957d8872d3859d6e75b99937becd.tar.bz2
Neodymium-c233ea31da07957d8872d3859d6e75b99937becd.zip
Port mod from MCP to Forge!
The only known regression is the sides of LOD=1 chunks look darker for some reason
Diffstat (limited to 'src/main/java/makamys/lodmod/mixin/MixinRenderGlobal.java')
-rw-r--r--src/main/java/makamys/lodmod/mixin/MixinRenderGlobal.java19
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);
+ }
+ }
+}