From 02d704b55af439337a63becf23d8a1e05780ef01 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 8 Jul 2016 14:05:22 +1000 Subject: [PATCH] SPIGOT-2503: Optimize block set --- src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java index 3239c06d34..88818262cf 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -137,7 +137,7 @@ public class CraftBlock implements Block { BlockPosition position = new BlockPosition(x, y, z); // 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 (type != 0 && type != getTypeId()) { + if (type != 0 && blockData.getBlock() instanceof BlockTileEntity && type != getTypeId()) { chunk.getHandle().getWorld().setTypeAndData(position, Blocks.AIR.getBlockData(), 0); }