diff options
-rw-r--r-- | src/main/java/makamys/lodmod/renderer/LODChunk.java | 7 | ||||
-rw-r--r-- | src/main/java/makamys/lodmod/renderer/LODRenderer.java | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/makamys/lodmod/renderer/LODChunk.java b/src/main/java/makamys/lodmod/renderer/LODChunk.java index cdf04b7..63b43e7 100644 --- a/src/main/java/makamys/lodmod/renderer/LODChunk.java +++ b/src/main/java/makamys/lodmod/renderer/LODChunk.java @@ -66,6 +66,13 @@ public class LODChunk { } } + public void putSimpleMesh(SimpleChunkMesh mesh) { + if(simpleMesh != null) { + renderer.setMeshVisible(simpleMesh, false); + } + simpleMesh = mesh; + } + public boolean hasChunkMeshes() { for(ChunkMesh cm : chunkMeshes) { if(cm != null) { diff --git a/src/main/java/makamys/lodmod/renderer/LODRenderer.java b/src/main/java/makamys/lodmod/renderer/LODRenderer.java index f40c977..76882ad 100644 --- a/src/main/java/makamys/lodmod/renderer/LODRenderer.java +++ b/src/main/java/makamys/lodmod/renderer/LODRenderer.java @@ -443,7 +443,7 @@ public class LODRenderer { } private void sendChunkToGPU(LODChunk lodChunk) { - lodChunk.simpleMesh = new SimpleChunkMesh(lodChunk.chunk); + lodChunk.putSimpleMesh(new SimpleChunkMesh(lodChunk.chunk)); Entity player = (Entity) Minecraft.getMinecraft().getIntegratedServer().getConfigurationManager().playerEntityList.get(0); |