diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-12-02 11:51:49 +0000 |
---|---|---|
committer | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-12-02 11:51:49 +0000 |
commit | b58808d54dd68a0ee78fef8edb37dc0c25b802e0 (patch) | |
tree | ad3347cd7c7b8ed9cd3f59eca15f0399a281572a /src/main/java/org/bukkit | |
parent | d2c263030739df5529e0fb1c29469c052eacd484 (diff) | |
download | craftbukkit-b58808d54dd68a0ee78fef8edb37dc0c25b802e0.tar craftbukkit-b58808d54dd68a0ee78fef8edb37dc0c25b802e0.tar.gz craftbukkit-b58808d54dd68a0ee78fef8edb37dc0c25b802e0.tar.lz craftbukkit-b58808d54dd68a0ee78fef8edb37dc0c25b802e0.tar.xz craftbukkit-b58808d54dd68a0ee78fef8edb37dc0c25b802e0.zip |
Fix tree related crashes due to lazy BlockState updating
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java index 9fb32a82..bf6841c9 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java @@ -140,14 +140,12 @@ public class CraftBlockState implements BlockState { Block block = getBlock(); if (block.getType() != getType()) { - if (force) { - block.setTypeId(getTypeId(), applyPhysics); - } else { + if (!force) { return false; } } - block.setData(getRawData(), applyPhysics); + block.setTypeIdAndData(getTypeId(), getRawData(), applyPhysics); world.getHandle().notify(new BlockPosition(x, y, z)); return true; |