SPIGOT-6592: Tile entities in custom ChunkGenerator causes crash

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2021-06-21 08:46:23 +10:00
parent 46a09d53f1
commit 26fd70263e

View file

@ -154,7 +154,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
IBlockData block = craftData.getTypeId(tx, ty, tz);
if (block.isTileEntity()) {
TileEntity tile = ((ITileEntity) block).createTile(new BlockPosition((x << 4) + tx, ty, (z << 4) + tz), block);
TileEntity tile = ((ITileEntity) block.getBlock()).createTile(new BlockPosition((x << 4) + tx, ty, (z << 4) + tz), block);
ichunkaccess.setTileEntity(tile);
}
}