diff options
author | makamys <makamys@outlook.com> | 2021-05-09 00:11:24 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2021-05-09 00:11:24 +0200 |
commit | ccb69814e0c5747efe84c4dc6a40bfe076ecf0c0 (patch) | |
tree | f6d9ac9d7f91e2eff57912089ef9bd2c66db5c97 /src/main/java/makamys/lodmod | |
parent | 6ae957fce32afec5abfcf1903a4db15c6e59c1cb (diff) | |
download | Neodymium-ccb69814e0c5747efe84c4dc6a40bfe076ecf0c0.tar.gz Neodymium-ccb69814e0c5747efe84c4dc6a40bfe076ecf0c0.tar.bz2 Neodymium-ccb69814e0c5747efe84c4dc6a40bfe076ecf0c0.zip |
Fix some visibility bugs
Diffstat (limited to 'src/main/java/makamys/lodmod')
-rw-r--r-- | src/main/java/makamys/lodmod/renderer/LODRenderer.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main/java/makamys/lodmod/renderer/LODRenderer.java b/src/main/java/makamys/lodmod/renderer/LODRenderer.java index af05dc6..7f5bbdb 100644 --- a/src/main/java/makamys/lodmod/renderer/LODRenderer.java +++ b/src/main/java/makamys/lodmod/renderer/LODRenderer.java @@ -372,6 +372,7 @@ public class LODRenderer { int y = Math.floorDiv(wr.posY, 16); setMeshVisible(lodChunk.chunkMeshes[y * 2 + 0], false); setMeshVisible(lodChunk.chunkMeshes[y * 2 + 1], false); + setMeshVisible(lodChunk.simpleMesh, false); } public void onDontDraw(WorldRenderer wr) { @@ -458,7 +459,7 @@ public class LODRenderer { Entity player = (Entity) Minecraft.getMinecraft().getIntegratedServer().getConfigurationManager().playerEntityList.get(0); lodChunk.tick(player); - setVisible(lodChunk, true); + setVisible(lodChunk, true, true); } public void setLOD(LODChunk lodChunk, int lod) { @@ -468,8 +469,12 @@ public class LODRenderer { lodChunkChanged(lodChunk); } - public void setVisible(LODChunk lodChunk, boolean visible) { - if(visible == lodChunk.visible) return; + public void setVisible(LODChunk chunk, boolean visible) { + setVisible(chunk, visible, false); + } + + public void setVisible(LODChunk lodChunk, boolean visible, boolean forceCheck) { + if(!forceCheck && visible == lodChunk.visible) return; lodChunk.visible = visible; lodChunkChanged(lodChunk); |