Class BlockMask
java.lang.Object
com.sk89q.worldedit.function.mask.AbstractMask
com.sk89q.worldedit.function.mask.AbstractExtentMask
com.sk89q.worldedit.function.mask.BlockMask
- All Implemented Interfaces:
Mask
A mask that checks whether blocks at the given positions are matched by
a block in a list.
This mask checks for both an exact block type and state value match, respecting fuzzy status of the BlockState.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add the given blocks to the list of criteria.void
add
(Collection<BaseBlock> blocks) Add the given blocks to the list of criteria.Get the list of blocks that are tested with.boolean
test
(BlockVector3 vector) Returns true if the criteria is met.Methods inherited from class com.sk89q.worldedit.function.mask.AbstractExtentMask
getExtent, setExtent
-
Constructor Details
-
BlockMask
Create a new block mask.- Parameters:
extent
- the extentblocks
- a list of blocks to match
-
BlockMask
Create a new block mask.- Parameters:
extent
- the extentblock
- an array of blocks to match
-
-
Method Details
-
add
Add the given blocks to the list of criteria.- Parameters:
blocks
- a list of blocks
-
add
Add the given blocks to the list of criteria.- Parameters:
block
- an array of blocks
-
getBlocks
Get the list of blocks that are tested with.- Returns:
- a list of blocks
-
test
Description copied from interface:Mask
Returns true if the criteria is met.- Parameters:
vector
- the vector to test- Returns:
- true if the criteria is met
-