From 05d746d1e475a5328813d9176548f3a3d8978f06 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot 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 By: Thinkofdeath --- .../src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 5fadeffca0..de3585726a 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 @@ -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) {