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

Dieser Commit ist enthalten in:
TomyLobo 2011-08-15 14:21:24 +02:00
Ursprung e67ea1e769
Commit a57830706e
2 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen

Datei anzeigen

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

Datei anzeigen

@ -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 {