Skip to content
This repository has been archived by the owner on Oct 18, 2020. It is now read-only.

Commit

Permalink
workaround for #17
Browse files Browse the repository at this point in the history
  • Loading branch information
lhns committed Aug 14, 2020
1 parent 67a9ca4 commit 1e76798
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,12 @@ else if (cps.isChunkLoaded(chunk.x, chunk.z)) {
ChunkSnapshot ss;
DynIntHashMap tileData;
if (vis) { // If visible
CompoundTag nbt = ChunkSerializer.serialize((ServerWorld) w, cps.getWorldChunk(chunk.x, chunk.z, false) /*TODO: NPE*/);
CompoundTag nbt = null;
try {
nbt = ChunkSerializer.serialize((ServerWorld) w, cps.getWorldChunk(chunk.x, chunk.z, false));
} catch (NullPointerException e) {
Log.severe("ChunkSerializer.serialize threw a NullPointerException", e);
}
if (nbt != null) nbt = nbt.getCompound("Level");
SnapshotCache.SnapshotRec ssr = prepChunkSnapshot(chunk, nbt);
ss = ssr.ss;
Expand Down

0 comments on commit 1e76798

Please sign in to comment.