Class BrushPattern
java.lang.Object
com.thevoxelbox.voxelsniper.brush.property.BrushPattern
A BrushPattern based on a WE pattern and a name.
-
Constructor Summary
ConstructorDescriptionBrushPattern
(Pattern pattern, String name) Create a new brush pattern.BrushPattern
(BlockState blockState) Create a new brush pattern from a block state.BrushPattern
(BlockType blockType) Create a new brush pattern from a block type. -
Method Summary
Modifier and TypeMethodDescription@Nullable BlockState
Try to parse the pattern as a block state.@Nullable BlockType
Try to parse the pattern as a block type.getName()
Return the name: - command argument for complex patterns - block id for block types - block data for block statesGets pattern.
-
Constructor Details
-
BrushPattern
Create a new brush pattern.- Parameters:
pattern
- the patternname
- the name- Since:
- 2.6.0
-
BrushPattern
Create a new brush pattern from a block type.- Parameters:
blockType
- the block type- Since:
- 2.6.0
-
BrushPattern
Create a new brush pattern from a block state.- Parameters:
blockState
- the block state- Since:
- 2.6.0
-
-
Method Details
-
getPattern
Gets pattern.- Returns:
- the pattern
- Since:
- 2.6.0
-
getName
Return the name: - command argument for complex patterns - block id for block types - block data for block states- Returns:
- the pattern name
- Since:
- 2.6.0
-
asBlockType
Try to parse the pattern as a block type.- Returns:
- the potential corresponding block type
- Since:
- 2.6.0
-
asBlockState
Try to parse the pattern as a block state.- Returns:
- the potential corresponding block state
- Since:
- 2.6.0
-