diff options
Diffstat (limited to 'src/main/java/makamys/lodmod/renderer')
-rw-r--r-- | src/main/java/makamys/lodmod/renderer/LODRenderer.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/makamys/lodmod/renderer/LODRenderer.java b/src/main/java/makamys/lodmod/renderer/LODRenderer.java index 28b146d..af05dc6 100644 --- a/src/main/java/makamys/lodmod/renderer/LODRenderer.java +++ b/src/main/java/makamys/lodmod/renderer/LODRenderer.java @@ -369,7 +369,9 @@ public class LODRenderer { public void onWorldRendererRender(WorldRenderer wr) { LODChunk lodChunk = getLODChunk(Math.floorDiv(wr.posX, 16), Math.floorDiv(wr.posZ, 16)); - setVisible(lodChunk, false); + int y = Math.floorDiv(wr.posY, 16); + setMeshVisible(lodChunk.chunkMeshes[y * 2 + 0], false); + setMeshVisible(lodChunk.chunkMeshes[y * 2 + 1], false); } public void onDontDraw(WorldRenderer wr) { @@ -380,7 +382,9 @@ public class LODRenderer { Entity player = (Entity)Minecraft.getMinecraft().getIntegratedServer().getConfigurationManager().playerEntityList.get(0); LODChunk lodChunk = getLODChunk(chunkX, chunkZ); - setVisible(lodChunk, true); + int y = Math.floorDiv(wr.posY, 16); + setMeshVisible(lodChunk.chunkMeshes[y * 2 + 0], true); + setMeshVisible(lodChunk.chunkMeshes[y * 2 + 1], true); } private double getLastSortDistanceSq(Entity player) { |