Class AbstractBrush
java.lang.Object
com.thevoxelbox.voxelsniper.brush.type.AbstractBrush
- All Implemented Interfaces:
Brush,VoxelCommandElement
- Direct Known Subclasses:
AbstractBlendBrush,AbstractPerformerBrush,AbstractStampBrush,BiomeBrush,BlockResetBrush,BlockResetSurfaceBrush,CanyonBrush,CleanSnowBrush,CometBrush,CopyPastaBrush,DomeBrush,DrainBrush,EntityBrush,EntityRemovalBrush,EraserBrush,ErodeBlendBrush,ErodeBrush,ExtrudeBrush,FlatOceanBrush,GenerateTreeBrush,HeatRayBrush,JockeyBrush,LightningBrush,MoveBrush,OceanBrush,PaintingBrush,PullBrush,RandomErodeBrush,RegenerateChunkBrush,Rotation2DBrush,Rotation2DVerticalBrush,Rotation3DBrush,RulerBrush,ScannerBrush,SetRedstoneFlipBrush,SetRedstoneRotateBrush,ShellBallBrush,ShellSetBrush,ShellVoxelBrush,SignOverwriteBrush,SnowConeBrush,SpiralStaircaseBrush,StencilBrush,StencilListBrush,TreeSnipeBrush,VoltmeterBrush,WarpBrush
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected static final VoxelSniperConfigprotected static final DecimalFormatprotected static final VoxelSniperPluginprotected static final File -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintclampY(int y) clampY(int x, int y, int z) clampY(BlockVector3 position) createEntity(BlockVector3 location, Entity bukkitEntity) booleangenerateTree(BlockVector3 location, TreeGenerator.TreeType treeType) getBlock(int x, int y, int z) getBlock(BlockVector3 position) getBlockType(int x, int y, int z) getBlockType(BlockVector3 position) booleangetBooleanProperty(String propertyName, boolean defaultValue) getDirection(BlockVector3 first, BlockVector3 second) doublegetDoubleProperty(String propertyName, double defaultValue) Enum<?> getEnumProperty(String propertyName, Class<?> enumClass, Enum<?> defaultValue) getFullBlock(int x, int y, int z) getFullBlock(BlockVector3 position) intgetHighestTerrainBlock(int x, int z, int minY, int maxY) intgetIntegerProperty(String propertyName, int defaultValue) Returns the Block before target Block.List<?> getListProperty(String propertyName, List<?> defaultValue) Return brush properties.getProperty(String propertyName, Object defaultValue) Return a config property associated to a brush, if exists.getProperty(String propertyName, Object defaultValue, Object defaultConfigValue) Return a config property associated to a brush, if exists.getRegistryProperty(String propertyName, NamespacedRegistry<? extends Keyed> registry, Keyed defaultValue) getRelativeBlock(int x, int y, int z, Direction direction) getRelativeBlock(BlockVector3 origin, Direction direction) getStringProperty(String propertyName, String defaultValue) voidLoad brush properties.protected voidonBrushCommand(Snipe snipe) protected voidonBrushInfoCommand(Snipe snipe, com.sk89q.worldedit.util.formatting.text.Component component) voidperform(Snipe snipe, ToolAction action, EditSession editSession, BlockVector3 targetBlock, BlockVector3 lastBlock) Perform brush action.voidrefreshChunk(int chunkX, int chunkZ) booleanregenerateChunk(int chunkX, int chunkZ, BiomeType biomeType) voidvoidvoidvoidsetBlock(BlockVector3 position, Pattern pattern) voidsetBlock(BlockVector3 position, BaseBlock block) voidsetBlockData(int x, int y, int z, BlockState blockState) voidsetBlockData(BlockVector3 position, BlockState blockState) voidsetLastBlock(BlockVector3 lastBlock) voidsetProperties(BrushProperties properties) Set brush properties.voidsetTargetBlock(BlockVector3 targetBlock) simulateSetBlock(int x, int y, int z, Pattern pattern) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.thevoxelbox.voxelsniper.brush.Brush
handleArrowAction, handleGunpowderAction, sendInfo
-
Field Details
-
PLUGIN
-
CONFIG
-
PLUGIN_DATA_FOLDER
-
CHUNK_SIZE
protected static final int CHUNK_SIZE- See Also:
-
DECIMAL_FORMAT
-
-
Constructor Details
-
AbstractBrush
public AbstractBrush()
-
-
Method Details
-
onBrushCommand
-
onBrushInfoCommand
protected void onBrushInfoCommand(Snipe snipe, com.sk89q.worldedit.util.formatting.text.Component component) -
perform
public void perform(Snipe snipe, ToolAction action, EditSession editSession, BlockVector3 targetBlock, BlockVector3 lastBlock) Description copied from interface:BrushPerform brush action. -
clampY
public int clampY(int y) -
clampY
-
clampY
-
setBiome
-
getHighestTerrainBlock
public int getHighestTerrainBlock(int x, int z, int minY, int maxY) -
regenerateChunk
-
refreshChunk
public void refreshChunk(int chunkX, int chunkZ) -
generateTree
-
createEntity
-
getDirection
-
getRelativeBlock
-
getRelativeBlock
-
getBlockType
-
getBlockType
-
setBlock
-
setBlock
-
setBlockData
-
setBlockData
-
simulateSetBlock
-
getFullBlock
-
getFullBlock
-
getBlock
-
getBlock
-
setBlock
-
setBlock
-
getProperties
Description copied from interface:BrushReturn brush properties.- Specified by:
getPropertiesin interfaceBrush- Returns:
- brush properties
-
setProperties
Description copied from interface:BrushSet brush properties.- Specified by:
setPropertiesin interfaceBrush- Parameters:
properties- brush properties
-
getProperty
Return a config property associated to a brush, if exists. Otherwise, set the default value and return it.- Parameters:
propertyName- the name of the propertydefaultValue- the default value to set and return- Returns:
- the associated proprorty, or the default value
-
getProperty
Return a config property associated to a brush, if exists. Otherwise, set the default value and return it.- Parameters:
propertyName- the name of the propertydefaultValue- the default value to set and returndefaultConfigValue- the default config value to set, objets such as Enum and Registry values are not serializable- Returns:
- the associated property, or the default value
-
getStringProperty
-
getBooleanProperty
-
getIntegerProperty
-
getDoubleProperty
-
getListProperty
-
getRegistryProperty
public Object getRegistryProperty(String propertyName, NamespacedRegistry<? extends Keyed> registry, Keyed defaultValue) -
getEnumProperty
-
loadProperties
public void loadProperties()Description copied from interface:BrushLoad brush properties.- Specified by:
loadPropertiesin interfaceBrush
-
getEditSession
-
getTargetBlock
-
setTargetBlock
-
getLastBlock
Returns the Block before target Block. -
setLastBlock
-