some open todos

This commit is contained in:
Pierre Kisters 2020-08-14 16:16:45 +02:00
parent 3955a7eaa3
commit ca3c510fc4
3 changed files with 3 additions and 2 deletions

View File

@ -186,7 +186,7 @@ public class ChunkSnapshot {
int bitsperblock = (statelist.length * 64) / 4096; int bitsperblock = (statelist.length * 64) / 4096;
int expectedStatelistLength = (4096 + (64 / bitsperblock) - 1) / (64 / bitsperblock); 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); Log.warning("Got statelist of length " + statelist.length + " but expected a length of " + expectedStatelistLength);
long[] expandedStatelist = new long[expectedStatelistLength]; long[] expandedStatelist = new long[expectedStatelistLength];
System.arraycopy(statelist, 0, expandedStatelist, 0, statelist.length); System.arraycopy(statelist, 0, expandedStatelist, 0, statelist.length);

View File

@ -186,7 +186,7 @@ public class ChunkSnapshot {
int bitsperblock = (statelist.length * 64) / 4096; int bitsperblock = (statelist.length * 64) / 4096;
int expectedStatelistLength = (4096 + (64 / bitsperblock) - 1) / (64 / bitsperblock); 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); Log.warning("Got statelist of length " + statelist.length + " but expected a length of " + expectedStatelistLength);
long[] expandedStatelist = new long[expectedStatelistLength]; long[] expandedStatelist = new long[expectedStatelistLength];
System.arraycopy(statelist, 0, expandedStatelist, 0, statelist.length); System.arraycopy(statelist, 0, expandedStatelist, 0, statelist.length);

View File

@ -1101,6 +1101,7 @@ public class FabricMapChunkCache extends MapChunkCache {
try { try {
nbt = ChunkSerializer.serialize((ServerWorld) w, cps.getWorldChunk(chunk.x, chunk.z, false)); nbt = ChunkSerializer.serialize((ServerWorld) w, cps.getWorldChunk(chunk.x, chunk.z, false));
} catch (NullPointerException e) { } 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); Log.severe("ChunkSerializer.serialize threw a NullPointerException", e);
} }
if (nbt != null) nbt = nbt.getCompound("Level"); if (nbt != null) nbt = nbt.getCompound("Level");