Ensure that the block entity has nbt

This commit is contained in:
TheMode 2021-06-24 16:13:00 +02:00
parent faa7c512af
commit 8ff7eed45c

View File

@ -166,7 +166,9 @@ public class AnvilLoader implements IChunkLoader {
.removeTag("x").removeTag("y").removeTag("z")
.removeTag("keepPacked");
// Place block
loadedChunk.setBlock(x, y, z, block.withNbt(te));
final var finalBlock = te.getSize() > 0 ?
block.withNbt(te) : block;
loadedChunk.setBlock(x, y, z, finalBlock);
}
}