From a57830706e0b303e05477e108654a12947dc5df0 Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Mon, 15 Aug 2011 14:21:24 +0200 Subject: [PATCH] Added support for non-integer radius to //superpickaxe recursive and improved performance a bit by making the recurse method static. --- .../sk89q/worldedit/commands/SuperPickaxeCommands.java | 2 +- .../java/com/sk89q/worldedit/tools/RecursivePickaxe.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/commands/SuperPickaxeCommands.java b/src/main/java/com/sk89q/worldedit/commands/SuperPickaxeCommands.java index 903d7c5c8..f28f4de24 100644 --- a/src/main/java/com/sk89q/worldedit/commands/SuperPickaxeCommands.java +++ b/src/main/java/com/sk89q/worldedit/commands/SuperPickaxeCommands.java @@ -88,7 +88,7 @@ public class SuperPickaxeCommands { throws WorldEditException { LocalConfiguration config = we.getConfiguration(); - int range = args.getInteger(0); + double range = args.getDouble(0); if (range > config.maxSuperPickaxeSize) { player.printError("Maximum range: " + config.maxSuperPickaxeSize); diff --git a/src/main/java/com/sk89q/worldedit/tools/RecursivePickaxe.java b/src/main/java/com/sk89q/worldedit/tools/RecursivePickaxe.java index 13c7cb008..bf25b4160 100644 --- a/src/main/java/com/sk89q/worldedit/tools/RecursivePickaxe.java +++ b/src/main/java/com/sk89q/worldedit/tools/RecursivePickaxe.java @@ -33,9 +33,9 @@ import com.sk89q.worldedit.blocks.BlockID; */ public class RecursivePickaxe implements BlockTool { private static final BaseBlock air = new BaseBlock(0); - private int range; + private double range; - public RecursivePickaxe(int range) { + public RecursivePickaxe(double range) { this.range = range; } @@ -84,9 +84,9 @@ public class RecursivePickaxe implements BlockTool { * @param initialType * @param visited */ - private void recurse(ServerInterface server, EditSession editSession, + private static void recurse(ServerInterface server, EditSession editSession, LocalWorld world, BlockVector pos, - Vector origin, int size, int initialType, + Vector origin, double size, int initialType, Set visited, boolean drop) throws MaxChangedBlocksException {