From 26fd70263e36db7aeddf8f5af83cd9cdec913a85 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Mon, 21 Jun 2021 08:46:23 +1000 Subject: [PATCH] SPIGOT-6592: Tile entities in custom ChunkGenerator causes crash By: md_5 --- .../org/bukkit/craftbukkit/generator/CustomChunkGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java index aa5d61f8bf..19d25ebea9 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java @@ -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); } }