aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2023-05-16 22:33:55 +0200
committermakamys <makamys@outlook.com>2023-05-16 23:39:39 +0200
commit2a226d6b9ea7a8fdea6e1922f9c3646277d5a1d4 (patch)
treead8d197257ddbf5dd5fcb5d1e2f0d46367cfc684 /src
parentf5bebbe833d84f6b8240b3c843a80a46a875a56d (diff)
downloadNeodymium-2a226d6b9ea7a8fdea6e1922f9c3646277d5a1d4.tar.gz
Neodymium-2a226d6b9ea7a8fdea6e1922f9c3646277d5a1d4.tar.bz2
Neodymium-2a226d6b9ea7a8fdea6e1922f9c3646277d5a1d4.zip
Only generate a stack trace if necessary
Diffstat (limited to 'src')
-rw-r--r--src/main/java/makamys/neodymium/renderer/ChunkMesh.java38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/main/java/makamys/neodymium/renderer/ChunkMesh.java b/src/main/java/makamys/neodymium/renderer/ChunkMesh.java
index 0a8c11c..6f637fc 100644
--- a/src/main/java/makamys/neodymium/renderer/ChunkMesh.java
+++ b/src/main/java/makamys/neodymium/renderer/ChunkMesh.java
@@ -117,27 +117,27 @@ public class ChunkMesh extends Mesh {
// Only show errors if we're actually supposed to be drawing something
if(!errors.isEmpty() || !warnings.isEmpty()) {
if(!Config.silenceErrors) {
- try {
- // Generate a stack trace
- throw new IllegalArgumentException();
- } catch(IllegalArgumentException e) {
- String dimId = wr.worldObj != null && wr.worldObj.provider != null ? "" + wr.worldObj.provider.dimensionId : "UNKNOWN";
- if(!errors.isEmpty()) {
- LOGGER.error("Errors in chunk ({}, {}, {}) in dimension {}:", x, y, z, dimId);
- for(String error : errors) {
- LOGGER.error("Error: " + error);
- }
- for(String warning : warnings) {
- LOGGER.error("Warning: " + warning);
- }
- 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:");
+ String dimId = wr.worldObj != null && wr.worldObj.provider != null ? "" + wr.worldObj.provider.dimensionId : "UNKNOWN";
+ if(!errors.isEmpty()) {
+ LOGGER.error("Errors in chunk ({}, {}, {}) in dimension {}:", x, y, z, dimId);
+ for(String error : errors) {
+ LOGGER.error("Error: " + error);
+ }
+ for(String warning : warnings) {
+ LOGGER.error("Warning: " + warning);
+ }
+ 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:");
+ try {
+ // Generate a stack trace
+ throw new IllegalArgumentException();
+ } catch(IllegalArgumentException e) {
e.printStackTrace();
- LOGGER.error("Skipping chunk due to errors.");
- quadBuf.reset();
- } else {
- LOGGER.debug("Warnings in chunk ({}, {}, {}) in dimension {}: {}", x, y, z, dimId, String.join(", ", warnings));
}
+ LOGGER.error("Skipping chunk due to errors.");
+ quadBuf.reset();
+ } else {
+ LOGGER.debug("Warnings in chunk ({}, {}, {}) in dimension {}: {}", x, y, z, dimId, String.join(", ", warnings));
}
}
}