Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-09-06 16:12:51 +02:00
Changed //cyl and //hcyl to use the same code.
Dieser Commit ist enthalten in:
Ursprung
1b88e1592e
Commit
33ff7fb34c
@ -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;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren