Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-03 01:50:07 +01: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;
|
return true;
|
||||||
|
|
||||||
// Draw a hollow cylinder
|
// 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]);
|
checkArgs(split, 2, 3, split[0]);
|
||||||
BaseBlock block = getBlock(split[1]);
|
BaseBlock block = getBlock(split[1]);
|
||||||
int radius = Math.max(1, Integer.parseInt(split[2]));
|
int radius = Math.max(1, Integer.parseInt(split[2]));
|
||||||
int height = split.length > 3 ? Integer.parseInt(split[3]) : 1;
|
int height = split.length > 3 ? Integer.parseInt(split[3]) : 1;
|
||||||
|
boolean filled = split[0].equalsIgnoreCase("//cyl");
|
||||||
|
|
||||||
Vector pos = session.getPlacementPosition(player);
|
Vector pos = session.getPlacementPosition(player);
|
||||||
int affected = editSession.makeHollowCylinder(pos, block, radius, height);
|
int affected;
|
||||||
player.print(affected + " block(s) have been created.");
|
if (filled) {
|
||||||
|
affected = editSession.makeCylinder(pos, block, radius, height);
|
||||||
return true;
|
} else {
|
||||||
|
affected = editSession.makeHollowCylinder(pos, block, radius, height);
|
||||||
// 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();
|
|
||||||
player.print(affected + " block(s) have been created.");
|
player.print(affected + " block(s) have been created.");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren