diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java index 26409a4f52..14e5f618e6 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java @@ -6,7 +6,7 @@ import org.bukkit.World; import org.bukkit.block.TileState; import org.bukkit.persistence.PersistentDataContainer; -public abstract class CraftBlockEntityState extends CraftBlockState implements TileState { +public class CraftBlockEntityState extends CraftBlockState implements TileState { private final T tileEntity; private final T snapshot; diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java index 79b64bdb3c..71d42d6ac1 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java @@ -106,6 +106,11 @@ public final class CraftBlockStates { private static final BlockStateFactory DEFAULT_FACTORY = new BlockStateFactory(CraftBlockState.class) { @Override public CraftBlockState createBlockState(World world, BlockPosition blockPosition, IBlockData blockData, TileEntity tileEntity) { + // SPIGOT-6754: Temporarily restore previous behaviour for tile entities with removed blocks + if (tileEntity != null) { + // block with unhandled TileEntity: + return new CraftBlockEntityState<>(world, tileEntity); + } Preconditions.checkState(tileEntity == null, "Unexpected BlockState for %s", CraftMagicNumbers.getMaterial(blockData.getBlock())); return new CraftBlockState(world, blockPosition, blockData); }