aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/makamys/neodymium/mixin/MixinWorldRenderer.java27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/main/java/makamys/neodymium/mixin/MixinWorldRenderer.java b/src/main/java/makamys/neodymium/mixin/MixinWorldRenderer.java
index a794931..42cedfe 100644
--- a/src/main/java/makamys/neodymium/mixin/MixinWorldRenderer.java
+++ b/src/main/java/makamys/neodymium/mixin/MixinWorldRenderer.java
@@ -1,17 +1,7 @@
package makamys.neodymium.mixin;
-import java.util.Collections;
-import java.util.List;
-
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import org.spongepowered.asm.mixin.Unique;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-
import com.google.common.collect.Lists;
-
+import makamys.neodymium.Compat;
import makamys.neodymium.Neodymium;
import makamys.neodymium.ducks.ITessellator;
import makamys.neodymium.ducks.IWorldRenderer;
@@ -20,6 +10,15 @@ import makamys.neodymium.renderer.NeoRenderer;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.entity.EntityLivingBase;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.Shadow;
+import org.spongepowered.asm.mixin.Unique;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Inject;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+
+import java.util.Collections;
+import java.util.List;
/** Inserts hooks in WorldRenderer to listen for changes, and to grab the tessellator data right before rendering. */
@Mixin(WorldRenderer.class)
@@ -150,6 +149,10 @@ abstract class MixinWorldRenderer implements IWorldRenderer {
@Override
public boolean isDrawn() {
- return isInFrustum && (!skipRenderPass[0] || !skipRenderPass[1]);
+ if (!(skipRenderPass[0] && skipRenderPass[1]))
+ return true;
+ if (!Compat.isShaders())
+ return isInFrustum;
+ return true;
}
}