diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-12-02 12:03:02 +0000 |
---|---|---|
committer | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-12-02 12:03:02 +0000 |
commit | 733e4290d84bc18b43b5311e1b12a6f7df65450d (patch) | |
tree | 78f74a02fc02e6a29594f7ba92aa48eea52f7080 /src/main/java/org/bukkit | |
parent | b58808d54dd68a0ee78fef8edb37dc0c25b802e0 (diff) | |
download | craftbukkit-733e4290d84bc18b43b5311e1b12a6f7df65450d.tar craftbukkit-733e4290d84bc18b43b5311e1b12a6f7df65450d.tar.gz craftbukkit-733e4290d84bc18b43b5311e1b12a6f7df65450d.tar.lz craftbukkit-733e4290d84bc18b43b5311e1b12a6f7df65450d.tar.xz craftbukkit-733e4290d84bc18b43b5311e1b12a6f7df65450d.zip |
[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
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java | 3 |
1 files changed, 2 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 5fadeffc..de358572 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) { |