Skip to content

Commit

Permalink
Fix NPE in AnvilWorldReader
Browse files Browse the repository at this point in the history
  • Loading branch information
kyngs committed Jan 13, 2024
1 parent 9f2461c commit 66139b6
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,7 @@ private static SlimeChunk readChunk(CompoundTag compound, int worldVersion) {
}

CompoundTag extraTag = new CompoundTag("", new CompoundMap());

extraTag.getValue().put(compound.getValue().get("ChunkBukkitValues")); // Attempt to Migrate PDC from Anvil format to Slime format.
compound.getAsCompoundTag("ChunkBukkitValues").ifPresent(chunkBukkitValues -> extraTag.getValue().put(chunkBukkitValues));

for (SlimeChunkSection section : sectionArray) {
if (section != null) { // Chunk isn't empty
Expand Down

0 comments on commit 66139b6

Please sign in to comment.