Search in sources :

Example 1 with CatenaryBrush

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

the class BrushCommands method catenaryBrush.

@Command(name = "catenary", aliases = { "cat", "gravityline", "saggedline" }, desc = "Create a hanging line between two points")
@CommandPermissions("worldedit.brush.spline")
public void catenaryBrush(InjectedValueAccess context, @Arg(desc = "Pattern") Pattern fill, @Arg(def = "1.2", desc = "Length of wire compared to distance between points") @Range(from = 1, to = Integer.MAX_VALUE) double lengthFactor, @Arg(desc = "The radius to sample for blending", def = "0") Expression radius, @Switch(name = 'h', desc = "Create only a shell") boolean shell, @Switch(name = 's', desc = "Select the clicked point after drawing") boolean select, @Switch(name = 'd', desc = "sags the catenary toward the facing direction") boolean facingDirection) throws WorldEditException {
    worldEdit.checkMaxBrushRadius(radius);
    set(context, new CatenaryBrush(shell, select, facingDirection, lengthFactor), "worldedit.brush.spline").setSize(radius).setFill(fill);
}
Also used : CatenaryBrush(com.fastasyncworldedit.core.command.tool.brush.CatenaryBrush) ScatterCommand(com.fastasyncworldedit.core.command.tool.brush.ScatterCommand) Command(org.enginehub.piston.annotation.Command) CommandPermissions(com.sk89q.worldedit.command.util.CommandPermissions)

Aggregations

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