Search in sources :

Example 1 with RecurseBrush

use of com.fastasyncworldedit.core.command.tool.brush.RecurseBrush in project FastAsyncWorldEdit by IntellectualSites.

the class BrushCommands method recursiveBrush.

@Command(name = "recursive", aliases = { "recurse", "r" }, desc = "Set all connected blocks", descFooter = "Set all connected blocks\n" + "Note: Set a mask to recurse along specific blocks")
@CommandPermissions("worldedit.brush.recursive")
public void recursiveBrush(InjectedValueAccess context, EditSession editSession, @Arg(desc = "Pattern") Pattern fill, @Arg(desc = "The radius to sample for blending", def = "5") Expression radius, @Switch(name = 'd', desc = "Apply in depth first order") boolean depthFirst) throws WorldEditException {
    worldEdit.checkMaxBrushRadius(radius);
    set(context, new RecurseBrush(depthFirst), "worldedit.brush.recursive").setSize(radius).setFill(fill).setMask(new IdMask(editSession));
}
Also used : IdMask(com.fastasyncworldedit.core.function.mask.IdMask) RecurseBrush(com.fastasyncworldedit.core.command.tool.brush.RecurseBrush) ScatterCommand(com.fastasyncworldedit.core.command.tool.brush.ScatterCommand) Command(org.enginehub.piston.annotation.Command) CommandPermissions(com.sk89q.worldedit.command.util.CommandPermissions)

Aggregations

RecurseBrush (com.fastasyncworldedit.core.command.tool.brush.RecurseBrush)1 ScatterCommand (com.fastasyncworldedit.core.command.tool.brush.ScatterCommand)1 IdMask (com.fastasyncworldedit.core.function.mask.IdMask)1 CommandPermissions (com.sk89q.worldedit.command.util.CommandPermissions)1 Command (org.enginehub.piston.annotation.Command)1