aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/makamys
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/makamys')
-rw-r--r--src/main/java/makamys/lodmod/renderer/LODRenderer.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/makamys/lodmod/renderer/LODRenderer.java b/src/main/java/makamys/lodmod/renderer/LODRenderer.java
index 9fdaa06..891f736 100644
--- a/src/main/java/makamys/lodmod/renderer/LODRenderer.java
+++ b/src/main/java/makamys/lodmod/renderer/LODRenderer.java
@@ -415,8 +415,12 @@ public class LODRenderer {
}
public void onWorldRendererRender(WorldRenderer wr) {
- LODChunk lodChunk = getLODChunk(Math.floorDiv(wr.posX, 16), Math.floorDiv(wr.posZ, 16));
+ int x = Math.floorDiv(wr.posX, 16);
int y = Math.floorDiv(wr.posY, 16);
+ int z = Math.floorDiv(wr.posZ, 16);
+
+ LODChunk lodChunk = getLODChunk(x, z);
+
setMeshVisible(lodChunk.chunkMeshes[y * 2 + 0], false);
setMeshVisible(lodChunk.chunkMeshes[y * 2 + 1], false);
setMeshVisible(lodChunk.simpleMeshes[0], false);