Added support for non-integer radius to //superpickaxe recursive and improved performance a bit by making the recurse method static.

This commit is contained in:
TomyLobo 2011-08-15 14:21:24 +02:00
parent e67ea1e769
commit a57830706e
2 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -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<BlockVector> visited, boolean drop)
throws MaxChangedBlocksException {