public class BlockMask extends AbstractExtentMask
This mask checks for both an exact block type and state value match, respecting fuzzy status of the BlockState.
Constructor and Description |
---|
BlockMask(Extent extent,
BaseBlock... block)
Create a new block mask.
|
BlockMask(Extent extent,
java.util.Collection<BaseBlock> blocks)
Create a new block mask.
|
Modifier and Type | Method and Description |
---|---|
void |
add(BaseBlock... block)
Add the given blocks to the list of criteria.
|
void |
add(java.util.Collection<BaseBlock> blocks)
Add the given blocks to the list of criteria.
|
java.util.Collection<BaseBlock> |
getBlocks()
Get the list of blocks that are tested with.
|
boolean |
test(BlockVector3 vector)
Returns true if the criteria is met.
|
Mask2D |
toMask2D()
Get the 2D version of this mask if one exists.
|
getExtent, setExtent
public BlockMask(Extent extent, java.util.Collection<BaseBlock> blocks)
extent
- the extentblocks
- a list of blocks to matchpublic void add(java.util.Collection<BaseBlock> blocks)
blocks
- a list of blockspublic void add(BaseBlock... block)
block
- an array of blockspublic java.util.Collection<BaseBlock> getBlocks()
public boolean test(BlockVector3 vector)
Mask
vector
- the vector to test