From ca44ee073a208998dc4db6685b83404312bf8190 Mon Sep 17 00:00:00 2001 From: wizjany Date: Tue, 7 Jan 2014 18:34:15 -0500 Subject: [PATCH] Added new log/leaves to floating tree remover tool. --- .../com/sk89q/worldedit/tools/FloatingTreeRemover.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sk89q/worldedit/tools/FloatingTreeRemover.java b/src/main/java/com/sk89q/worldedit/tools/FloatingTreeRemover.java index 0906391c0..dac067df2 100755 --- a/src/main/java/com/sk89q/worldedit/tools/FloatingTreeRemover.java +++ b/src/main/java/com/sk89q/worldedit/tools/FloatingTreeRemover.java @@ -51,7 +51,9 @@ public class FloatingTreeRemover implements BlockTool { switch (world.getBlockType(clicked)) { case BlockID.LOG: + case BlockID.LOG2: case BlockID.LEAVES: + case BlockID.LEAVES2: case BlockID.BROWN_MUSHROOM_CAP: case BlockID.RED_MUSHROOM_CAP: case BlockID.VINE: @@ -75,7 +77,9 @@ public class FloatingTreeRemover implements BlockTool { final int typeId = editSession.getBlock(blockVector).getType(); switch (typeId) { case BlockID.LOG: + case BlockID.LOG2: case BlockID.LEAVES: + case BlockID.LEAVES2: case BlockID.BROWN_MUSHROOM_CAP: case BlockID.RED_MUSHROOM_CAP: case BlockID.VINE: @@ -131,7 +135,9 @@ public class FloatingTreeRemover implements BlockTool { continue; case BlockID.LOG: + case BlockID.LOG2: case BlockID.LEAVES: + case BlockID.LEAVES2: case BlockID.BROWN_MUSHROOM_CAP: case BlockID.RED_MUSHROOM_CAP: case BlockID.VINE: @@ -142,7 +148,8 @@ public class FloatingTreeRemover implements BlockTool { default: // we hit something solid - evaluate where we came from final int curId = world.getBlockType(current); - if (curId == BlockID.LEAVES || curId == BlockID.VINE) { + if (curId == BlockID.LEAVES || curId == BlockID.LEAVES2 + || curId == BlockID.VINE) { // leaves touching a wall/the ground => stop walking this route continue; } else {