Search in sources :

Example 1 with SnowSmoothBrush

use of com.sk89q.worldedit.command.tool.brush.SnowSmoothBrush in project FastAsyncWorldEdit by IntellectualSites.

the class BrushCommands method snowSmoothBrush.

@Command(name = "snowsmooth", desc = "Choose the snow terrain softener brush", descFooter = "Example: '/brush snowsmooth 5 1 -l 3'")
@CommandPermissions("worldedit.brush.snowsmooth")
public void snowSmoothBrush(Player player, LocalSession session, // FAWE start - Expression > double, default iteration number 1 is much better.
@Arg(desc = "The radius to sample for softening", def = "2") Expression radius, @Arg(desc = "The number of iterations to perform", def = "1") int iterations, // FAWE end
@ArgFlag(name = 'l', desc = "The number of snow blocks under snow", def = "1") int snowBlockCount, @ArgFlag(name = 'm', desc = "The mask of blocks to use for the heightmap") 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 SnowSmoothBrush(iterations, mask), "worldedit.brush.snowsmooth").setSize(radius);
    player.print(Caption.of("worldedit.brush.smooth.equip", radius, iterations, Caption.of("worldedit.brush.smooth." + (mask == null ? "no" : "") + "filter")));
}
Also used : FaweLimit(com.fastasyncworldedit.core.limit.FaweLimit) SnowSmoothBrush(com.sk89q.worldedit.command.tool.brush.SnowSmoothBrush) ScatterCommand(com.fastasyncworldedit.core.command.tool.brush.ScatterCommand) Command(org.enginehub.piston.annotation.Command) CommandPermissions(com.sk89q.worldedit.command.util.CommandPermissions)

Aggregations

ScatterCommand (com.fastasyncworldedit.core.command.tool.brush.ScatterCommand)1 FaweLimit (com.fastasyncworldedit.core.limit.FaweLimit)1 SnowSmoothBrush (com.sk89q.worldedit.command.tool.brush.SnowSmoothBrush)1 CommandPermissions (com.sk89q.worldedit.command.util.CommandPermissions)1 Command (org.enginehub.piston.annotation.Command)1