Class BrushCommands

java.lang.Object
com.sk89q.worldedit.command.BrushCommands

public class BrushCommands extends Object
Commands to set brush shape.
  • Constructor Details

    • BrushCommands

      public BrushCommands(WorldEdit worldEdit)
      Create a new instance.
      Parameters:
      worldEdit - reference to WorldEdit
  • Method Details

    • blendBallBrush

      public void blendBallBrush(org.enginehub.piston.inject.InjectedValueAccess context, @Arg(desc="The radius to sample for blending",def="5") Expression radius, @Arg(desc="Minimum difference in frequency to change block",def="1") int minFreqDiff, @Switch(name='a',desc="Compare only air vs existing blocks") boolean onlyAir, @ArgFlag(name='m',desc="Mask to limit blocks being considered",def="") Mask mask) throws WorldEditException
      Throws:
      WorldEditException
    • erodeBrush

      public void erodeBrush(org.enginehub.piston.inject.InjectedValueAccess context, @Arg(desc="The radius for eroding",def="5") Expression radius, @Arg(desc="erodeFaces",def="2") int erodefaces, @Arg(desc="erodeRec",def="1") int erodeRec, @Arg(desc="fillFaces",def="5") int fillFaces, @Arg(desc="fillRec",def="1") int fillRec) throws WorldEditException
      Throws:
      WorldEditException
    • pullBrush

      public void pullBrush(org.enginehub.piston.inject.InjectedValueAccess context, @Arg(desc="The radius to sample for blending",def="5") Expression radius, @Arg(desc="erodeFaces",def="6") int erodefaces, @Arg(desc="erodeRec",def="0") int erodeRec, @Arg(desc="fillFaces",def="1") int fillFaces, @Arg(desc="fillRec",def="1") int fillRec) throws WorldEditException
      Throws:
      WorldEditException
    • circleBrush

      public void circleBrush(org.enginehub.piston.inject.InjectedValueAccess context, @Arg(desc="Pattern") Pattern fill, @Arg(desc="The radius to sample for blending",def="5") Expression radius, @Arg(name="filled",desc="Whether the circle should be filled",def="false") boolean filled) throws WorldEditException
      Throws:
      WorldEditException
    • recursiveBrush

      public void recursiveBrush(org.enginehub.piston.inject.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
      Throws:
      WorldEditException
    • lineBrush

      public void lineBrush(org.enginehub.piston.inject.InjectedValueAccess context, @Arg(desc="Pattern") Pattern fill, @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="Selects the clicked point after drawing") boolean select, @Switch(name='f',desc="Create a flat line") boolean flat) throws WorldEditException
      Throws:
      WorldEditException
    • splineBrush

      public void splineBrush(Player player, org.enginehub.piston.inject.InjectedValueAccess context, @Arg(desc="Pattern") Pattern fill, @Arg(desc="The radius to sample for blending",def="25") Expression radius) throws WorldEditException
      Throws:
      WorldEditException
    • sweepBrush

      public void sweepBrush(Player player, org.enginehub.piston.inject.InjectedValueAccess context, @Arg(desc="int",def="-1") int copies) throws WorldEditException
      Throws:
      WorldEditException
    • catenaryBrush

      public void catenaryBrush(org.enginehub.piston.inject.InjectedValueAccess context, @Arg(desc="Pattern") Pattern fill, @Arg(def="1.2",desc="Length of wire compared to distance between points") @org.jetbrains.annotations.Range(from=1L, to=2147483647L) 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
      Throws:
      WorldEditException
    • surfaceSpline

      public void surfaceSpline(Player player, org.enginehub.piston.inject.InjectedValueAccess context, @Arg(desc="Pattern") Pattern fill, @Arg(desc="The radius to sample for blending",def="0") Expression radius, @Arg(desc="double",def="0") double tension, @Arg(desc="double",def="0") double bias, @Arg(desc="double",def="0") double continuity, @Arg(desc="double",def="10") double quality) throws WorldEditException
      Throws:
      WorldEditException
    • blobBrush

      public void blobBrush(org.enginehub.piston.inject.InjectedValueAccess context, @Arg(desc="Pattern") Pattern fill, @Arg(desc="radii to multiply x,y,z by",def="10") Vector3 radius, @Arg(name="roundness",desc="roundness",def="100") double sphericity, @Arg(desc="double",def="30") double frequency, @Arg(desc="double",def="50") double amplitude) throws WorldEditException
      Throws:
      WorldEditException
    • shatterBrush

      public void shatterBrush(EditSession editSession, org.enginehub.piston.inject.InjectedValueAccess context, @Arg(desc="Pattern") Pattern fill, @Arg(desc="The radius to sample for blending",def="10") Expression radius, @Arg(desc="Lines",def="10") int count) throws WorldEditException
      Throws:
      WorldEditException
    • stencilBrush

      public void stencilBrush(Player player, LocalSession session, org.enginehub.piston.inject.InjectedValueAccess context, @Arg(desc="Pattern") Pattern fill, @Arg(desc="Expression",def="5") Expression radius, @Arg(desc="String",def="") String image, @Arg(def="0",desc="rotation") @org.jetbrains.annotations.Range(from=0L, to=360L) int rotation, @Arg(desc="double",def="1") double yscale, @Switch(name='w',desc="Apply at maximum saturation") boolean onlyWhite, @Switch(name='r',desc="Apply random rotation") boolean randomRotate) throws WorldEditException, FileNotFoundException
      Throws:
      WorldEditException
      FileNotFoundException
    • imageBrush

      public void imageBrush(LocalSession session, org.enginehub.piston.inject.InjectedValueAccess context, @Arg(desc="Image URL (imgur only)") String imageURL, @Arg(desc="The size of the brush",def="5") Expression radius, @Arg(def="1",desc="scale height") double yscale, @Switch(name='a',desc="Use image Alpha") boolean alpha, @Switch(name='f',desc="Blend the image with existing terrain") boolean fadeOut) throws WorldEditException, IOException, URISyntaxException
      Throws:
      WorldEditException
      IOException
      URISyntaxException
    • surfaceBrush

      public void surfaceBrush(org.enginehub.piston.inject.InjectedValueAccess context, @Arg(desc="Pattern") Pattern fill, @Arg(desc="Expression",def="5") Expression radius) throws WorldEditException
      Throws:
      WorldEditException
    • scatterBrush

      public void scatterBrush(org.enginehub.piston.inject.InjectedValueAccess context, @Arg(desc="Pattern") Pattern fill, @Arg(desc="radius",def="5") Expression radius, @Arg(desc="points",def="5") double points, @Arg(desc="distance",def="1") double distance, @Switch(name='o',desc="Overlay the block") boolean overlay) throws WorldEditException
      Throws:
      WorldEditException
    • scatterSchemBrush

      public void scatterSchemBrush(Player player, org.enginehub.piston.inject.InjectedValueAccess context, @Arg(name="clipboard",desc="Clipboard uri") String clipboardStr, @Arg(desc="Mask of block to place on. Defaults to solid blocks.",def="") Mask mask, @Arg(desc="Expression",def="30") Expression radius, @Arg(desc="double",def="50") double density, @Switch(name='r',desc="Apply random rotation") boolean rotate) throws WorldEditException
      Throws:
      WorldEditException
    • surfaceLayer

      public void surfaceLayer(org.enginehub.piston.inject.InjectedValueAccess context, @Arg(desc="Expression") Expression radius, @Arg(desc="List of comma-separated patterns") List<Pattern> patternLayers) throws WorldEditException
      Throws:
      WorldEditException
    • splatterBrush

      public void splatterBrush(org.enginehub.piston.inject.InjectedValueAccess context, @Arg(desc="Pattern") Pattern fill, @Arg(desc="Expression",def="5") Expression radius, @Arg(desc="double",def="1") double points, @Arg(desc="double",def="5") double recursion, @Arg(desc="boolean",def="true") boolean solid) throws WorldEditException
      Throws:
      WorldEditException
    • scatterCommandBrush

      public void scatterCommandBrush(Player player, org.enginehub.piston.inject.InjectedValueAccess context, @Arg(desc="The minimum distance between each point") Expression radius, @Arg(desc="double",def="1") double points, @Arg(desc="double",def="1") double distance, @Arg(desc="List of comma-separated commands") List<String> commandStr, @Switch(name='p',desc="Show any printed output") boolean print) throws WorldEditException
      Throws:
      WorldEditException
    • heightBrush

      public void heightBrush(Player player, LocalSession session, @Arg(desc="Expression",def="5") Expression radius, @Arg(desc="double",def="1") double yscale, @Arg(desc="String",def="") String image, @Arg(def="0",desc="rotation") @org.jetbrains.annotations.Range(from=0L, to=360L) int rotation, @Switch(name='r',desc="Random off-axis rotation") boolean randomRotate, @Switch(name='l',desc="Work on snow layers") boolean layers, @Switch(name='s',desc="Disable smoothing") boolean dontSmooth, org.enginehub.piston.inject.InjectedValueAccess context) throws WorldEditException, FileNotFoundException
      Throws:
      WorldEditException
      FileNotFoundException
    • cliffBrush

      public void cliffBrush(Player player, LocalSession session, @Arg(desc="Expression",def="5") Expression radius, @Arg(desc="String",def="") String image, @Arg(def="0",desc="rotation") @org.jetbrains.annotations.Range(from=0L, to=360L) int rotation, @Arg(desc="double",def="1") double yscale, @Switch(name='r',desc="Enables random off-axis rotation") boolean randomRotate, @Switch(name='l',desc="Will work on snow layers") boolean layers, @Switch(name='s',desc="Disables smoothing") boolean dontSmooth, org.enginehub.piston.inject.InjectedValueAccess context) throws WorldEditException, FileNotFoundException
      Throws:
      WorldEditException
      FileNotFoundException
    • flattenBrush

      public void flattenBrush(Player player, LocalSession session, @Arg(desc="Expression",def="5") Expression radius, @Arg(desc="String",def="") String image, @Arg(def="0",desc="rotation") @org.jetbrains.annotations.Range(from=0L, to=360L) int rotation, @Arg(desc="double",def="1") double yscale, @Switch(name='r',desc="Enables random off-axis rotation") boolean randomRotate, @Switch(name='l',desc="Will work on snow layers") boolean layers, @Switch(name='s',desc="Disables smoothing") boolean dontSmooth, org.enginehub.piston.inject.InjectedValueAccess context) throws WorldEditException, FileNotFoundException
      Throws:
      WorldEditException
      FileNotFoundException
    • copy

      public void copy(Player player, LocalSession session, org.enginehub.piston.inject.InjectedValueAccess context, @Arg(desc="Expression",def="5") Expression radius, @Switch(name='r',desc="Apply random rotation on paste") boolean randomRotate, @Switch(name='a',desc="Apply auto view based rotation on paste") boolean autoRotate) throws WorldEditException
      Throws:
      WorldEditException
    • command

      public void command(org.enginehub.piston.inject.InjectedValueAccess context, @Arg(desc="Expression") Expression radius, @Arg(desc="Command to run") List<String> input, @Switch(name='h',desc="Hide any printed output") boolean hide) throws WorldEditException
      Throws:
      WorldEditException
    • saveBrush

      public void saveBrush(Player player, LocalSession session, @Arg(desc="String name") String name, @Switch(name='g',desc="Save the brush globally") boolean root) throws WorldEditException, IOException
      Throws:
      WorldEditException
      IOException
    • list

      public void list(Actor actor, org.enginehub.piston.inject.InjectedValueAccess args, @ArgFlag(name='p',desc="Prints the requested page",def="0") int page) throws WorldEditException
      Throws:
      WorldEditException
    • deform

      public void deform(Player player, LocalSession localSession, @Arg(desc="The shape of the region") RegionFactory shape, @Arg(desc="The size of the brush",def="5") double radius, @Arg(desc="Expression to apply",def="y-=0.2") String expression, @Switch(name='r',desc="Use the game\'s coordinate origin") boolean useRawCoords, @Switch(name='o',desc="Use the placement position as the origin") boolean usePlacement) throws WorldEditException
      Throws:
      WorldEditException
    • set

      public void set(Player player, LocalSession localSession, @Arg(desc="The shape of the region") RegionFactory shape, @Arg(desc="The size of the brush",def="5") Expression radius, @Arg(desc="The pattern of blocks to set") Pattern pattern) throws WorldEditException
      Throws:
      WorldEditException
    • forest

      public void forest(Player player, LocalSession localSession, @Arg(desc="The shape of the region") RegionFactory shape, @Arg(desc="The size of the brush",def="5") Expression radius, @Arg(desc="The density of the brush",def="20") double density, @Arg(desc="The type of tree to use") TreeGenerator.TreeType type) throws WorldEditException
      Throws:
      WorldEditException
    • raise

      public void raise(Player player, LocalSession localSession, @Arg(desc="The shape of the region") RegionFactory shape, @Arg(desc="The size of the brush",def="5") Expression radius) throws WorldEditException
      Throws:
      WorldEditException
    • lower

      public void lower(Player player, LocalSession localSession, @Arg(desc="The shape of the region") RegionFactory shape, @Arg(desc="The size of the brush",def="5") Expression radius) throws WorldEditException
      Throws:
      WorldEditException
    • snow

      public void snow(Player player, LocalSession localSession, @Arg(desc="The shape of the region") RegionFactory shape, @Arg(desc="The size of the brush",def="5") double radius, @Switch(name='s',desc="Whether to stack snow") boolean stack) throws WorldEditException
      Throws:
      WorldEditException
    • sphereBrush

      public void sphereBrush(Player player, org.enginehub.piston.inject.InjectedValueAccess context, @Arg(desc="The pattern of blocks to set") Pattern pattern, @Arg(desc="The radius of the sphere",def="2") Expression radius, @Switch(name='h',desc="Create hollow spheres instead") boolean hollow, @Switch(name='f',desc="Create falling spheres instead") boolean falling) throws WorldEditException
      Throws:
      WorldEditException
    • cylinderBrush

      public void cylinderBrush(org.enginehub.piston.inject.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, @Arg(desc="The thickness of the cylinder. Requires -h switch be given. 0 creates a standard hollow cylinder.",def="0") double thickness, @Switch(name='h',desc="Create hollow cylinders instead") boolean hollow) throws WorldEditException
      Throws:
      WorldEditException
    • clipboardBrush

      public void clipboardBrush(Player player, LocalSession session, @Switch(name='a',desc="Don\'t paste air from the clipboard") boolean ignoreAir, @Switch(name='o',desc="Paste starting at the target location, instead of centering on it") boolean usingOrigin, @Switch(name='e',desc="Paste entities if available") boolean pasteEntities, @Switch(name='b',desc="Paste biomes if available") boolean pasteBiomes, @ArgFlag(name='m',desc="Skip blocks matching this mask in the clipboard") Mask sourceMask, org.enginehub.piston.inject.InjectedValueAccess context, @Switch(name='r',desc="Apply random rotation on paste, combines with existing clipboard transforms") boolean randomRotate) throws WorldEditException
      Throws:
      WorldEditException
    • smoothBrush

      public void smoothBrush(Player player, LocalSession session, @Arg(desc="The radius to sample for softening",def="2") Expression radius, @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, org.enginehub.piston.inject.InjectedValueAccess context) throws WorldEditException
      Throws:
      WorldEditException
    • snowSmoothBrush

      public void snowSmoothBrush(Player player, LocalSession session, @Arg(desc="The radius to sample for softening",def="2") Expression radius, @Arg(desc="The number of iterations to perform",def="1") int iterations, @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, org.enginehub.piston.inject.InjectedValueAccess context) throws WorldEditException
      Throws:
      WorldEditException
    • extinguishBrush

      public void extinguishBrush(org.enginehub.piston.inject.InjectedValueAccess context, EditSession editSession, @Arg(desc="The radius to extinguish",def="5") Expression radius) throws WorldEditException
      Throws:
      WorldEditException
    • gravityBrush

      public void gravityBrush(org.enginehub.piston.inject.InjectedValueAccess context, @Arg(desc="The radius to apply gravity in",def="5") Expression radius, @Switch(name='h',desc="Affect blocks starting at max Y, rather than the target location Y + radius") boolean fromMaxY) throws WorldEditException
      Throws:
      WorldEditException
    • butcherBrush

      public void butcherBrush(Player player, LocalSession session, @Arg(desc="Radius to kill mobs in",def="5") Expression radius, @Switch(name='p',desc="Also kill pets") boolean killPets, @Switch(name='n',desc="Also kill NPCs") boolean killNpcs, @Switch(name='g',desc="Also kill golems") boolean killGolems, @Switch(name='a',desc="Also kill animals") boolean killAnimals, @Switch(name='b',desc="Also kill ambient mobs") boolean killAmbient, @Switch(name='t',desc="Also kill mobs with name tags") boolean killWithName, @Switch(name='f',desc="Also kill all friendly mobs (Applies the flags `-abgnpt`)") boolean killFriendly, @Switch(name='r',desc="Also destroy armor stands") boolean killArmorStands, @Switch(name='w',desc="Also kill water mobs") boolean killWater, org.enginehub.piston.inject.InjectedValueAccess context) throws WorldEditException
      Throws:
      WorldEditException
    • process

      public BrushSettings process(Player player, Arguments arguments, BrushSettings settings) throws WorldEditException
      Throws:
      WorldEditException
    • set

      public BrushSettings set(org.enginehub.piston.inject.InjectedValueAccess context, Brush brush, String permission) throws InvalidToolBindException
      Throws:
      InvalidToolBindException