diff options
author | makamys <makamys@outlook.com> | 2022-08-19 05:54:19 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2022-08-19 05:54:19 +0200 |
commit | a36c12b2b99307a561001c172cffbee7f719d1f4 (patch) | |
tree | d08c8624021ea3f26b3d734f533da3a218ec6e61 /src/main/java/makamys/neodymium/renderer/ChunkMesh.java | |
parent | c4c49dee5f623e49245eae53cebf7b1245ae3b45 (diff) | |
download | Neodymium-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.java | 24 |
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; } |