diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java index fd257e56e2..cc95f43533 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -19,7 +19,6 @@ import net.minecraft.world.level.GeneratorAccess; import net.minecraft.world.level.RayTrace; import net.minecraft.world.level.biome.BiomeBase; import net.minecraft.world.level.block.BlockRedstoneWire; -import net.minecraft.world.level.block.BlockTileEntity; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.entity.TileEntity; import net.minecraft.world.level.block.state.IBlockData; @@ -74,10 +73,6 @@ public class CraftBlock implements Block { return new CraftBlock(world, position); } - private net.minecraft.world.level.block.Block getNMSBlock() { - return getNMS().getBlock(); - } - public net.minecraft.world.level.block.state.IBlockData getNMS() { return world.getType(position); } @@ -189,7 +184,7 @@ public class CraftBlock implements Block { public boolean setTypeAndData(final IBlockData blockData, final boolean applyPhysics) { // SPIGOT-611: need to do this to prevent glitchiness. Easier to handle this here (like /setblock) than to fix weirdness in tile entity cleanup - if (!blockData.isAir() && blockData.getBlock() instanceof BlockTileEntity && blockData.getBlock() != getNMSBlock()) { + if (getNMS().isTileEntity()) { // SPIGOT-3725 always remove old tile entity // SPIGOT-4612: faster - just clear tile if (world instanceof net.minecraft.world.level.World) { ((net.minecraft.world.level.World) world).removeTileEntity(position);