3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-07 03:50:06 +01:00

Changed //cyl and //hcyl to use the same code.

Dieser Commit ist enthalten in:
sk89q 2010-10-18 10:41:56 -07:00
Ursprung 1b88e1592e
Commit 33ff7fb34c

Datei anzeigen

@ -409,28 +409,21 @@ public class WorldEdit {
return true;
// Draw a hollow cylinder
} else if (split[0].equalsIgnoreCase("//hcyl")) {
} else if (split[0].equalsIgnoreCase("//hcyl")
|| split[0].equalsIgnoreCase("//cyl")) {
checkArgs(split, 2, 3, split[0]);
BaseBlock block = getBlock(split[1]);
int radius = Math.max(1, Integer.parseInt(split[2]));
int height = split.length > 3 ? Integer.parseInt(split[3]) : 1;
boolean filled = split[0].equalsIgnoreCase("//cyl");
Vector pos = session.getPlacementPosition(player);
int affected = editSession.makeHollowCylinder(pos, block, radius, height);
player.print(affected + " block(s) have been created.");
return true;
// Draw a filled cylinder
} else if (split[0].equalsIgnoreCase("//cyl")) {
checkArgs(split, 2, 3, split[0]);
BaseBlock block = getBlock(split[1]);
int radius = Math.max(1, Integer.parseInt(split[2]));
int height = split.length > 3 ? Integer.parseInt(split[3]) : 1;
Vector pos = session.getPlacementPosition(player);
int affected = editSession.makeCylinder(pos, block, radius, height);
player.findFreePosition();
int affected;
if (filled) {
affected = editSession.makeCylinder(pos, block, radius, height);
} else {
affected = editSession.makeHollowCylinder(pos, block, radius, height);
}
player.print(affected + " block(s) have been created.");
return true;