aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/makamys/lodmod/ducks/IWorldRenderer.java1
-rw-r--r--src/main/java/makamys/lodmod/mixin/MixinWorldRenderer.java3
-rw-r--r--src/main/java/makamys/lodmod/renderer/LODRenderer.java1
3 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/makamys/lodmod/ducks/IWorldRenderer.java b/src/main/java/makamys/lodmod/ducks/IWorldRenderer.java
index 83857d6..6527ba7 100644
--- a/src/main/java/makamys/lodmod/ducks/IWorldRenderer.java
+++ b/src/main/java/makamys/lodmod/ducks/IWorldRenderer.java
@@ -9,4 +9,5 @@ import net.minecraft.client.renderer.WorldRenderer;
public interface IWorldRenderer {
public List<ChunkMesh> getChunkMeshes();
+ public boolean isDrawn();
}
diff --git a/src/main/java/makamys/lodmod/mixin/MixinWorldRenderer.java b/src/main/java/makamys/lodmod/mixin/MixinWorldRenderer.java
index 02b130f..5753798 100644
--- a/src/main/java/makamys/lodmod/mixin/MixinWorldRenderer.java
+++ b/src/main/java/makamys/lodmod/mixin/MixinWorldRenderer.java
@@ -174,7 +174,8 @@ abstract class MixinWorldRenderer implements IWorldRenderer {
}
}
- private boolean isDrawn() {
+ @Override
+ public boolean isDrawn() {
return isInFrustum && (!skipRenderPass[0] || !skipRenderPass[1]);
}
}
diff --git a/src/main/java/makamys/lodmod/renderer/LODRenderer.java b/src/main/java/makamys/lodmod/renderer/LODRenderer.java
index dec8276..10f748e 100644
--- a/src/main/java/makamys/lodmod/renderer/LODRenderer.java
+++ b/src/main/java/makamys/lodmod/renderer/LODRenderer.java
@@ -471,6 +471,7 @@ public class LODRenderer {
if(Minecraft.getMinecraft().theWorld.getChunkFromChunkCoords(Math.floorDiv(wr.posX, 16), Math.floorDiv(wr.posZ, 16)).isChunkLoaded) {
LODChunk lodChunk = getLODChunk(Math.floorDiv(wr.posX, 16), Math.floorDiv(wr.posZ, 16));
+ lodChunk.hidden[Math.floorDiv(wr.posY, 16)] = !((IWorldRenderer)wr).isDrawn();
lodChunk.putChunkMeshes(Math.floorDiv(wr.posY, 16), ((IWorldRenderer)wr).getChunkMeshes());
}
}