From 1af61f827bb89c48fd2ba9cb4b3c1fc005362206 Mon Sep 17 00:00:00 2001 From: wizjany Date: Sun, 17 Mar 2013 21:38:02 -0400 Subject: [PATCH] Fix block setting while not in fast mode --- src/main/java/com/sk89q/worldedit/EditSession.java | 2 +- .../com/sk89q/worldedit/bukkit/DefaultNmsBlock.java | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/EditSession.java b/src/main/java/com/sk89q/worldedit/EditSession.java index 8e07952a3..59b26cee0 100644 --- a/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/src/main/java/com/sk89q/worldedit/EditSession.java @@ -234,7 +234,7 @@ public class EditSession { result = world.setBlockType(pt, 0); } } else { - result = world.setBlock(pt, block, fastMode); + result = world.setBlock(pt, block, !fastMode); } return result; diff --git a/src/main/java/com/sk89q/worldedit/bukkit/DefaultNmsBlock.java b/src/main/java/com/sk89q/worldedit/bukkit/DefaultNmsBlock.java index 6ff3cf308..dee9a7ee0 100644 --- a/src/main/java/com/sk89q/worldedit/bukkit/DefaultNmsBlock.java +++ b/src/main/java/com/sk89q/worldedit/bukkit/DefaultNmsBlock.java @@ -259,14 +259,10 @@ public class DefaultNmsBlock extends NmsBlock { world.copyToWorld(position, (BaseBlock) block); } - changed = craftWorld.getHandle().setData(x, y, z, block.getData(), 0); - - if (changed) { - if (notifyAdjacent) { - craftWorld.getHandle().update(x, y, z, block.getId()); - } else { - craftWorld.getHandle().notify(x, y, z); - } + changed = craftWorld.getHandle().setData(x, y, z, block.getData(), 0) || changed; + if (changed && notifyAdjacent) { + craftWorld.getHandle().notify(x, y, z); + craftWorld.getHandle().update(x, y, z, block.getId()); } return changed;