From 83c7930142f28183a3f8004c08ed3c981f4e6e35 Mon Sep 17 00:00:00 2001 From: iceBear67 Date: Wed, 8 Jan 2025 19:08:42 +0800 Subject: [PATCH] Add logging for schematic validation in LitematicConverterV3 Include an info log message to indicate when schematic validation starts. This improves debugging and monitoring of the conversion process. --- .../io/ib67/sfcraft/util/litematic/LitematicConverterV3.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/io/ib67/sfcraft/util/litematic/LitematicConverterV3.java b/src/main/java/io/ib67/sfcraft/util/litematic/LitematicConverterV3.java index 409a686..3b9d7df 100644 --- a/src/main/java/io/ib67/sfcraft/util/litematic/LitematicConverterV3.java +++ b/src/main/java/io/ib67/sfcraft/util/litematic/LitematicConverterV3.java @@ -57,6 +57,7 @@ public class LitematicConverterV3 extends LitematicConverter { int width, int length ) { + log.info("Validating schematic"); // find invalid palette ids var buf = new PacketByteBuf(Unpooled.wrappedBuffer(weBlockData)); var paletteIds = new Int2ObjectOpenHashMap<>(); @@ -81,6 +82,7 @@ public class LitematicConverterV3 extends LitematicConverter { paletteIds.keySet().intStream().filter(it->!touchedIds.contains(it)) .forEach(it-> log.error("Unused palette id: {}, blockState: {}", it, paletteIds.get(it))); } + private static Vec3i decodePositionFromDataIndex(int width, int length, int index) { // index = (y * width * length) + (z * width) + x int y = index / (width * length);