some open todos
This commit is contained in:
parent
aed6a2442a
commit
5474c1bb1f
3 changed files with 3 additions and 2 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue