diff options
author | makamys <makamys@outlook.com> | 2021-05-08 23:35:20 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2021-05-08 23:35:20 +0200 |
commit | 6ae957fce32afec5abfcf1903a4db15c6e59c1cb (patch) | |
tree | b66008fbee35658fb9839abd07d30eebc348c1b4 /src/main/java/makamys/lodmod/renderer | |
parent | cd5b1d1ac214937c8ced6d0a72b8fdc889e71c3c (diff) | |
download | Neodymium-6ae957fce32afec5abfcf1903a4db15c6e59c1cb.tar.gz Neodymium-6ae957fce32afec5abfcf1903a4db15c6e59c1cb.tar.bz2 Neodymium-6ae957fce32afec5abfcf1903a4db15c6e59c1cb.zip |
No more flickers
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) { |