From 0040ba9867b847791c867a75dbfc3253103d518c Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Sun, 7 Aug 2011 05:19:55 +0200 Subject: [PATCH] Added support for non-integer radius to the sphere, cylinder, smooth and extinguish brushes. --- .../java/com/sk89q/worldedit/commands/BrushCommands.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/commands/BrushCommands.java b/src/main/java/com/sk89q/worldedit/commands/BrushCommands.java index eb9b5557a..cf34b19bc 100644 --- a/src/main/java/com/sk89q/worldedit/commands/BrushCommands.java +++ b/src/main/java/com/sk89q/worldedit/commands/BrushCommands.java @@ -64,7 +64,7 @@ public class BrushCommands { LocalConfiguration config = we.getConfiguration(); - int radius = args.argsLength() > 1 ? args.getInteger(1) : 2; + double radius = args.argsLength() > 1 ? args.getDouble(1) : 2; if (radius > config.maxBrushRadius) { player.printError("Maximum allowed brush radius: " + config.maxBrushRadius); @@ -101,7 +101,7 @@ public class BrushCommands { LocalConfiguration config = we.getConfiguration(); - int radius = args.argsLength() > 1 ? args.getInteger(1) : 2; + double radius = args.argsLength() > 1 ? args.getDouble(1) : 2; if (radius > config.maxBrushRadius) { player.printError("Maximum allowed brush radius: " + config.maxBrushRadius); @@ -182,7 +182,7 @@ public class BrushCommands { LocalConfiguration config = we.getConfiguration(); - int radius = args.argsLength() > 0 ? args.getInteger(0) : 2; + double radius = args.argsLength() > 1 ? args.getDouble(1) : 2; if (radius > config.maxBrushRadius) { player.printError("Maximum allowed brush radius: " + config.maxBrushRadius); @@ -213,7 +213,7 @@ public class BrushCommands { LocalConfiguration config = we.getConfiguration(); - int radius = args.argsLength() > 1 ? args.getInteger(1) : 5; + double radius = args.argsLength() > 1 ? args.getDouble(1) : 2; if (radius > config.maxBrushRadius) { player.printError("Maximum allowed brush radius: " + config.maxBrushRadius);