From f5bebbe833d84f6b8240b3c843a80a46a875a56d Mon Sep 17 00:00:00 2001 From: makamys Date: Tue, 16 May 2023 22:33:28 +0200 Subject: Include dimension id in warnings/errors --- src/main/java/makamys/neodymium/renderer/ChunkMesh.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/makamys/neodymium/renderer/ChunkMesh.java b/src/main/java/makamys/neodymium/renderer/ChunkMesh.java index ea2d637..0a8c11c 100644 --- a/src/main/java/makamys/neodymium/renderer/ChunkMesh.java +++ b/src/main/java/makamys/neodymium/renderer/ChunkMesh.java @@ -121,8 +121,9 @@ public class ChunkMesh extends Mesh { // 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 ({}, {}, {})", x, y, z); + LOGGER.error("Errors in chunk ({}, {}, {}) in dimension {}:", x, y, z, dimId); for(String error : errors) { LOGGER.error("Error: " + error); } @@ -135,7 +136,7 @@ public class ChunkMesh extends Mesh { LOGGER.error("Skipping chunk due to errors."); quadBuf.reset(); } else { - LOGGER.debug("Warnings in chunk ({}, {}, {}): {}", x, y, z, String.join(", ", warnings)); + LOGGER.debug("Warnings in chunk ({}, {}, {}) in dimension {}: {}", x, y, z, dimId, String.join(", ", warnings)); } } } -- cgit