diff options
author | md_5 <git@md-5.net> | 2016-06-26 12:31:24 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-06-26 12:31:24 +1000 |
commit | 568e27fbd08cf5717ff23f01cc57c37f83ec8218 (patch) | |
tree | c90328aee5921b9319b44e0dc7e359a87581204f /src/main | |
parent | 4c1e9342cbe16f4c83d9360e3a21283d3fd80e50 (diff) | |
download | craftbukkit-568e27fbd08cf5717ff23f01cc57c37f83ec8218.tar craftbukkit-568e27fbd08cf5717ff23f01cc57c37f83ec8218.tar.gz craftbukkit-568e27fbd08cf5717ff23f01cc57c37f83ec8218.tar.lz craftbukkit-568e27fbd08cf5717ff23f01cc57c37f83ec8218.tar.xz craftbukkit-568e27fbd08cf5717ff23f01cc57c37f83ec8218.zip |
Fix air setting block updates
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java index a5d6f1d2..70099480 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -137,7 +137,9 @@ 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 - chunk.getHandle().getWorld().setTypeAndData(position, Blocks.AIR.getBlockData(), 0); + if (type != 0) { + chunk.getHandle().getWorld().setTypeAndData(position, Blocks.AIR.getBlockData(), 0); + } if (applyPhysics) { return chunk.getHandle().getWorld().setTypeAndData(position, blockData, 3); |