use of com.sk89q.worldedit.command.tool.brush.HollowCylinderBrush in project FastAsyncWorldEdit by IntellectualSites.
the class BrushCommands method cylinderBrush.
@Command(name = "cylinder", aliases = { "cyl", "c" }, desc = "Choose the cylinder brush")
@CommandPermissions("worldedit.brush.cylinder")
public void cylinderBrush(InjectedValueAccess context, @Arg(desc = "The pattern of blocks to set") Pattern pattern, @Arg(desc = "The radius of the cylinder", def = "2") Expression radius, @Arg(desc = "The height of the cylinder", def = "1") int height, // FAWE start - hcyl thickness
@Arg(desc = "The thickness of the cylinder. Requires -h switch be given. 0 creates a standard hollow cylinder.", def = "0") double thickness, // FAWE end
@Switch(name = 'h', desc = "Create hollow cylinders instead") boolean hollow) throws WorldEditException {
worldEdit.checkMaxBrushRadius(radius);
worldEdit.checkMaxBrushRadius(height);
BrushSettings settings;
if (hollow) {
// FAWE start - hcyl thickness
settings = set(context, new HollowCylinderBrush(height, thickness), "worldedit.brush.cylinder");
// FAWE end
} else {
settings = set(context, new CylinderBrush(height), "worldedit.brush.cylinder");
}
settings.setSize(radius).setFill(pattern);
}
Aggregations