diff options
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java index 3001cb44..bbf7b508 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -130,7 +130,7 @@ public class CraftBlock implements Block { @Override public void setType(Material type, boolean applyPhysics) { - setTypeAndData(type, (byte) 0, applyPhysics); + setBlockData(type.createBlockData(), applyPhysics); } @Override @@ -143,10 +143,6 @@ public class CraftBlock implements Block { setTypeAndData(((CraftBlockData) data).getState(), applyPhysics); } - public boolean setTypeAndData(final Material type, final byte data, final boolean applyPhysics) { - return setTypeAndData(CraftMagicNumbers.getBlock(type, data), applyPhysics); - } - 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()) { @@ -529,7 +525,7 @@ public class CraftBlock implements Block { if (itemCausesDrops(item)) { return breakNaturally(); } else { - return setTypeAndData(Material.AIR, (byte) 0, true); + return setTypeAndData(Blocks.AIR.getBlockData(), true); } } |