aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/makamys/neodymium/renderer/ChunkMesh.java18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/main/java/makamys/neodymium/renderer/ChunkMesh.java b/src/main/java/makamys/neodymium/renderer/ChunkMesh.java
index a574765..e284da3 100644
--- a/src/main/java/makamys/neodymium/renderer/ChunkMesh.java
+++ b/src/main/java/makamys/neodymium/renderer/ChunkMesh.java
@@ -81,15 +81,21 @@ public class ChunkMesh extends Mesh {
// Sometimes the tessellator has no vertices and weird flags. Don't warn in this case, just silently return.
return;
}
+ boolean errors = false;
if(t.vertexCount % 4 != 0) {
- LOGGER.error("Error: Vertex count is not a multiple of 4");
- return;
+ LOGGER.error("Error in chunk " + tessellatorToString(t) + ": Vertex count is not a multiple of 4");
+ errors = true;
}
if(t.drawMode != GL11.GL_QUADS) {
- LOGGER.error("Error: Unsupported draw mode: " + t.drawMode);
+ LOGGER.error("Error in chunk " + tessellatorToString(t) + ": Unsupported draw mode: " + t.drawMode);
+ errors = true;
}
if(!t.hasTexture || !t.hasBrightness || !t.hasColor || t.hasNormals) {
- LOGGER.error("Error: Unsupported tessellator flags");
+ LOGGER.error("Error in chunk " + tessellatorToString(t) + ": Unsupported tessellator flags");
+ errors = true;
+ }
+ if(errors) {
+ LOGGER.error("Skipping chunk due to errors.");
return;
}
@@ -98,6 +104,10 @@ public class ChunkMesh extends Mesh {
}
}
+ private static String tessellatorToString(Tessellator t) {
+ return "(" + t.xOffset + ", " + t.yOffset + ", " + t.zOffset + ")";
+ }
+
public void finishConstruction() {
List<MeshQuad> quads = quadBuf.getAsList();