aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/makamys/neodymium/renderer/ChunkMesh.java
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2022-08-19 05:54:19 +0200
committermakamys <makamys@outlook.com>2022-08-19 05:54:19 +0200
commita36c12b2b99307a561001c172cffbee7f719d1f4 (patch)
treed08c8624021ea3f26b3d734f533da3a218ec6e61 /src/main/java/makamys/neodymium/renderer/ChunkMesh.java
parentc4c49dee5f623e49245eae53cebf7b1245ae3b45 (diff)
downloadNeodymium-a36c12b2b99307a561001c172cffbee7f719d1f4.tar.gz
Neodymium-a36c12b2b99307a561001c172cffbee7f719d1f4.tar.bz2
Neodymium-a36c12b2b99307a561001c172cffbee7f719d1f4.zip
Add option to not print rendering errors
Diffstat (limited to 'src/main/java/makamys/neodymium/renderer/ChunkMesh.java')
-rw-r--r--src/main/java/makamys/neodymium/renderer/ChunkMesh.java24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/main/java/makamys/neodymium/renderer/ChunkMesh.java b/src/main/java/makamys/neodymium/renderer/ChunkMesh.java
index e1023c5..8809c17 100644
--- a/src/main/java/makamys/neodymium/renderer/ChunkMesh.java
+++ b/src/main/java/makamys/neodymium/renderer/ChunkMesh.java
@@ -94,18 +94,20 @@ public class ChunkMesh extends Mesh {
errors.add("Chunk uses GL lighting, this is not implemented.");
}
if(!errors.isEmpty()) {
- try {
- // Generate a stack trace
- throw new IllegalArgumentException();
- } catch(IllegalArgumentException e) {
- LOGGER.error("Errors in chunk ({}, {}, {})", x, y, z);
- for(String error : errors) {
- LOGGER.error("Error: " + error);
+ if(!Config.silenceErrors) {
+ try {
+ // Generate a stack trace
+ throw new IllegalArgumentException();
+ } catch(IllegalArgumentException e) {
+ LOGGER.error("Errors in chunk ({}, {}, {})", x, y, z);
+ for(String error : errors) {
+ LOGGER.error("Error: " + error);
+ }
+ LOGGER.error("(World renderer pos: ({}, {}, {}), Tessellator pos: ({}, {}, {}), Tessellation count: {}", wr.posX, wr.posY, wr.posZ, t.xOffset, t.yOffset, t.zOffset, tesselatorDataCount);
+ LOGGER.error("Stack trace:");
+ e.printStackTrace();
+ LOGGER.error("Skipping chunk due to errors.");
}
- LOGGER.error("(World renderer pos: ({}, {}, {}), Tessellator pos: ({}, {}, {}), Tessellation count: {}", wr.posX, wr.posY, wr.posZ, t.xOffset, t.yOffset, t.zOffset, tesselatorDataCount);
- LOGGER.error("Stack trace:");
- e.printStackTrace();
- LOGGER.error("Skipping chunk due to errors.");
}
return;
}