aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/makamys/neodymium/config/Config.java2
-rw-r--r--src/main/java/makamys/neodymium/renderer/ChunkMesh.java24
2 files changed, 15 insertions, 11 deletions
diff --git a/src/main/java/makamys/neodymium/config/Config.java b/src/main/java/makamys/neodymium/config/Config.java
index a8ea60e..8dc7ffa 100644
--- a/src/main/java/makamys/neodymium/config/Config.java
+++ b/src/main/java/makamys/neodymium/config/Config.java
@@ -71,6 +71,8 @@ public class Config {
public static boolean replaceOpenGLSplash;
@ConfigBoolean(cat="misc", def=false, com="Don't warn about incompatibilities in chat, and activate renderer even in spite of critical ones.")
public static boolean ignoreIncompatibilities;
+ @ConfigBoolean(cat="misc", def=false, com="Don't print non-critical rendering errors.")
+ public static boolean silenceErrors;
@ConfigInt(cat="debug", def=-1, min=-1, max=Integer.MAX_VALUE)
public static int maxMeshesPerFrame;
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;
}