From 733e4290d84bc18b43b5311e1b12a6f7df65450d Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Tue, 2 Dec 2014 12:03:02 +0000 Subject: [PATCH] [Slightly breaking] setType(Id) will not longer reuse the previous data value of the block and instead reset the the data value to the block's default --- src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java | 3 ++- 1 file changed, 2 insertions(+), 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 5fadeffca0..de3585726a 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -121,7 +121,8 @@ public class CraftBlock implements Block { } public boolean setTypeId(final int type, final boolean applyPhysics) { - return setTypeIdAndData(type, getData(), applyPhysics); + net.minecraft.server.Block block = getNMSBlock(type); + return setTypeIdAndData(type, (byte) block.toLegacyData(block.getBlockData()), applyPhysics); } public boolean setTypeIdAndData(final int type, final byte data, final boolean applyPhysics) {