From 803b4df72eaf3b0182206f312766e16dd9fb2e30 Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Sat, 19 Oct 2013 11:57:54 +0200 Subject: [PATCH] Masks are now checked in setBlock instead of rawSetBlock. Untested!!! --- src/main/java/com/sk89q/worldedit/EditSession.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/EditSession.java b/src/main/java/com/sk89q/worldedit/EditSession.java index db294e957..b01a2522e 100644 --- a/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/src/main/java/com/sk89q/worldedit/EditSession.java @@ -190,12 +190,6 @@ public boolean rawSetBlock(Vector pt, BaseBlock block) { return false; } - if (mask != null) { - if (!mask.matches(this, pt)) { - return false; - } - } - final int existing = world.getBlockType(pt); // Clear the container block so that it doesn't drop items @@ -259,6 +253,12 @@ public boolean setBlock(Vector pt, BaseBlock block) throws MaxChangedBlocksException { BlockVector blockPt = pt.toBlockVector(); + if (mask != null) { + if (!mask.matches(this, blockPt)) { + return false; + } + } + // if (!original.containsKey(blockPt)) { original.put(blockPt, getBlock(pt));