Added support for non-integer radius to //cyl, //hcyl, //sphere and //hsphere

Dieser Commit ist enthalten in:
TomyLobo 2011-08-07 05:20:50 +02:00
Ursprung 9d98ca3db8
Commit 57b5c5b546

Datei anzeigen

@ -45,7 +45,7 @@ public class GenerationCommands {
throws WorldEditException { throws WorldEditException {
Pattern block = we.getBlockPattern(player, args.getString(0)); Pattern block = we.getBlockPattern(player, args.getString(0));
int radius = Math.max(1, args.getInteger(1)); double radius = Math.max(1, args.getDouble(1));
int height = args.argsLength() > 2 ? args.getInteger(2) : 1; int height = args.argsLength() > 2 ? args.getInteger(2) : 1;
Vector pos = session.getPlacementPosition(player); Vector pos = session.getPlacementPosition(player);
@ -66,7 +66,7 @@ public class GenerationCommands {
throws WorldEditException { throws WorldEditException {
Pattern block = we.getBlockPattern(player, args.getString(0)); Pattern block = we.getBlockPattern(player, args.getString(0));
int radius = Math.max(1, args.getInteger(1)); double radius = Math.max(1, args.getDouble(1));
int height = args.argsLength() > 2 ? args.getInteger(2) : 1; int height = args.argsLength() > 2 ? args.getInteger(2) : 1;
Vector pos = session.getPlacementPosition(player); Vector pos = session.getPlacementPosition(player);
@ -87,7 +87,7 @@ public class GenerationCommands {
throws WorldEditException { throws WorldEditException {
Pattern block = we.getBlockPattern(player, args.getString(0)); Pattern block = we.getBlockPattern(player, args.getString(0));
int radius = Math.max(1, args.getInteger(1)); double radius = Math.max(1, args.getDouble(1));
boolean raised = args.argsLength() > 2 boolean raised = args.argsLength() > 2
? (args.getString(2).equalsIgnoreCase("true") ? (args.getString(2).equalsIgnoreCase("true")
|| args.getString(2).equalsIgnoreCase("yes")) || args.getString(2).equalsIgnoreCase("yes"))
@ -116,7 +116,7 @@ public class GenerationCommands {
throws WorldEditException { throws WorldEditException {
Pattern block = we.getBlockPattern(player, args.getString(0)); Pattern block = we.getBlockPattern(player, args.getString(0));
int radius = Math.max(1, args.getInteger(1)); double radius = Math.max(1, args.getDouble(1));
boolean raised = args.argsLength() > 2 boolean raised = args.argsLength() > 2
? (args.getString(2).equalsIgnoreCase("true") ? (args.getString(2).equalsIgnoreCase("true")
|| args.getString(2).equalsIgnoreCase("yes")) || args.getString(2).equalsIgnoreCase("yes"))