From b58808d54dd68a0ee78fef8edb37dc0c25b802e0 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Tue, 2 Dec 2014 11:51:49 +0000 Subject: [PATCH] Fix tree related crashes due to lazy BlockState updating --- .../java/org/bukkit/craftbukkit/block/CraftBlockState.java | 6 ++---- 1 file 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 9fb32a82fb..bf6841c93e 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;