aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/makamys/neodymium/renderer/NeoChunk.java7
-rw-r--r--src/main/java/makamys/neodymium/renderer/NeoRegion.java2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/makamys/neodymium/renderer/NeoChunk.java b/src/main/java/makamys/neodymium/renderer/NeoChunk.java
index 92b5c86..de4746c 100644
--- a/src/main/java/makamys/neodymium/renderer/NeoChunk.java
+++ b/src/main/java/makamys/neodymium/renderer/NeoChunk.java
@@ -43,11 +43,14 @@ public class NeoChunk {
if(chunkMeshes[cy * 2 + i] != null) {
renderer.removeMesh(chunkMeshes[cy * 2 + i]);
chunkMeshes[cy * 2 + i].destroy();
- } else {
+ region.meshes--;
+ dirty = true;
+ }
+ if(newChunkMesh != null){
region.meshes++;
+ dirty = true;
}
chunkMeshes[cy * 2 + i] = newChunkMesh;
- dirty = true;
}
}
if(dirty) {
diff --git a/src/main/java/makamys/neodymium/renderer/NeoRegion.java b/src/main/java/makamys/neodymium/renderer/NeoRegion.java
index 7e85138..ea3347a 100644
--- a/src/main/java/makamys/neodymium/renderer/NeoRegion.java
+++ b/src/main/java/makamys/neodymium/renderer/NeoRegion.java
@@ -95,7 +95,7 @@ public class NeoRegion {
@Override
public String toString() {
- return "LODRegion(" + regionX + ", " + regionZ + ")";
+ return "NeoRegion(" + regionX + ", " + regionZ + ")[n=" + meshes + "]";
}
public boolean shouldDelete() {