From ca3c510fc46a998c94c722b9e80c2ea67d3d080f Mon Sep 17 00:00:00 2001 From: Pierre Kisters Date: Fri, 14 Aug 2020 16:16:45 +0200 Subject: [PATCH] some open todos --- .../src/main/java/org/dynmap/fabric_1_16_1/ChunkSnapshot.java | 2 +- .../src/main/java/org/dynmap/fabric_1_16_2/ChunkSnapshot.java | 2 +- .../main/java/org/dynmap/fabric_1_16_2/FabricMapChunkCache.java | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fabric-1.16.1/src/main/java/org/dynmap/fabric_1_16_1/ChunkSnapshot.java b/fabric-1.16.1/src/main/java/org/dynmap/fabric_1_16_1/ChunkSnapshot.java index e1a14bf8..d3ba79ac 100644 --- a/fabric-1.16.1/src/main/java/org/dynmap/fabric_1_16_1/ChunkSnapshot.java +++ b/fabric-1.16.1/src/main/java/org/dynmap/fabric_1_16_1/ChunkSnapshot.java @@ -186,7 +186,7 @@ public class ChunkSnapshot { int bitsperblock = (statelist.length * 64) / 4096; int expectedStatelistLength = (4096 + (64 / bitsperblock) - 1) / (64 / bitsperblock); - if (expectedStatelistLength > statelist.length) { + if (expectedStatelistLength > statelist.length) { // TODO: find out why this is happening and why it doesn't seem to happen on other platforms Log.warning("Got statelist of length " + statelist.length + " but expected a length of " + expectedStatelistLength); long[] expandedStatelist = new long[expectedStatelistLength]; System.arraycopy(statelist, 0, expandedStatelist, 0, statelist.length); diff --git a/fabric-1.16.2/src/main/java/org/dynmap/fabric_1_16_2/ChunkSnapshot.java b/fabric-1.16.2/src/main/java/org/dynmap/fabric_1_16_2/ChunkSnapshot.java index 98d46f07..f301bea5 100644 --- a/fabric-1.16.2/src/main/java/org/dynmap/fabric_1_16_2/ChunkSnapshot.java +++ b/fabric-1.16.2/src/main/java/org/dynmap/fabric_1_16_2/ChunkSnapshot.java @@ -186,7 +186,7 @@ public class ChunkSnapshot { int bitsperblock = (statelist.length * 64) / 4096; int expectedStatelistLength = (4096 + (64 / bitsperblock) - 1) / (64 / bitsperblock); - if (expectedStatelistLength > statelist.length) { + if (expectedStatelistLength > statelist.length) { // TODO: find out why this is happening and why it doesn't seem to happen on other platforms Log.warning("Got statelist of length " + statelist.length + " but expected a length of " + expectedStatelistLength); long[] expandedStatelist = new long[expectedStatelistLength]; System.arraycopy(statelist, 0, expandedStatelist, 0, statelist.length); diff --git a/fabric-1.16.2/src/main/java/org/dynmap/fabric_1_16_2/FabricMapChunkCache.java b/fabric-1.16.2/src/main/java/org/dynmap/fabric_1_16_2/FabricMapChunkCache.java index fdbc3a5d..cfa1cc4f 100644 --- a/fabric-1.16.2/src/main/java/org/dynmap/fabric_1_16_2/FabricMapChunkCache.java +++ b/fabric-1.16.2/src/main/java/org/dynmap/fabric_1_16_2/FabricMapChunkCache.java @@ -1101,6 +1101,7 @@ public class FabricMapChunkCache extends MapChunkCache { try { nbt = ChunkSerializer.serialize((ServerWorld) w, cps.getWorldChunk(chunk.x, chunk.z, false)); } catch (NullPointerException e) { + // TODO: find out why this is happening and why it only seems to happen since 1.16.2 Log.severe("ChunkSerializer.serialize threw a NullPointerException", e); } if (nbt != null) nbt = nbt.getCompound("Level");