use of com.sk89q.worldedit.command.tool.brush.SmoothBrush in project FastAsyncWorldEdit by IntellectualSites.
the class BrushCommands method smoothBrush.
@Command(name = "smooth", desc = "Choose the terrain softener brush", descFooter = "Example: '/brush smooth 2 4 grass_block,dirt,stone'")
@CommandPermissions("worldedit.brush.smooth")
public void smoothBrush(Player player, LocalSession session, // FAWE start - Expression > double
@Arg(desc = "The radius to sample for softening", def = "2") Expression radius, // FAWE end
@Arg(desc = "The number of iterations to perform", def = "4") int iterations, @Arg(desc = "The mask of blocks to use for the heightmap", def = "") Mask mask, InjectedValueAccess context) throws WorldEditException {
worldEdit.checkMaxBrushRadius(radius);
// FAWE start
FaweLimit limit = Settings.settings().getLimit(player);
iterations = Math.min(limit.MAX_ITERATIONS, iterations);
// FAWE end
set(context, new SmoothBrush(iterations, mask), "worldedit.brush.smooth").setSize(radius);
player.print(Caption.of("worldedit.brush.smooth.equip", radius, iterations, Caption.of("worldedit.brush.smooth." + (mask == null ? "no" : "") + "filter")));
}
Aggregations