From 0bea05832828e1b2b7b7091f9ddcdb939b35fd5c Mon Sep 17 00:00:00 2001 From: zml2008 Date: Sat, 4 Feb 2012 15:23:08 -0800 Subject: [PATCH] Fixed //replace. Closes #1069 --- .../java/com/sk89q/worldedit/EditSession.java | 27 +++++-------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/EditSession.java b/src/main/java/com/sk89q/worldedit/EditSession.java index 401edd3c1..6192e3b74 100644 --- a/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/src/main/java/com/sk89q/worldedit/EditSession.java @@ -1275,17 +1275,9 @@ public class EditSession { for (int z = minZ; z <= maxZ; ++z) { Vector pt = new Vector(x, y, z); BaseBlock curBlockType = getBlock(pt); - - if (definiteBlockTypes == null) { - //replace - if (curBlockType.isAir()) { - continue; - } - } else { - //replace - if (!definiteBlockTypes.contains(curBlockType) && fuzzyBlockTypes.contains(curBlockType.getType())) { - continue; - } + //replace + if (!definiteBlockTypes.contains(curBlockType) && !fuzzyBlockTypes.contains(curBlockType.getType())) { + continue; } if (setBlock(pt, toBlock)) { @@ -1298,16 +1290,9 @@ public class EditSession { for (Vector pt : region) { BaseBlock curBlockType = getBlock(pt); - if (definiteBlockTypes == null) { - //replace - if (curBlockType.isAir()) { - continue; - } - } else { - //replace - if (!definiteBlockTypes.contains(curBlockType) && fuzzyBlockTypes.contains(curBlockType.getType())) { - continue; - } + //replace + if (!definiteBlockTypes.contains(curBlockType) && !fuzzyBlockTypes.contains(curBlockType.getType())) { + continue; } if (setBlock(pt, toBlock)) {