public class BlockStateMask extends AbstractExtentMask
Constructor and Description |
---|
BlockStateMask(Extent extent,
java.util.Map<java.lang.String,java.lang.String> states,
boolean strict)
Creates a mask that checks if a given block has the desired properties set to the desired value.
|
Modifier and Type | Method and Description |
---|---|
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 BlockStateMask(Extent extent, java.util.Map<java.lang.String,java.lang.String> states, boolean strict)
extent
- the extent to get blocks fromstates
- the desired states (property -> value) that a block should have to match the maskstrict
- true to only match blocks that have all properties and values, false to also match blocks that
do not have the properties (but only fail blocks with the properties but wrong values)public boolean test(BlockVector3 vector)
Mask
vector
- the vector to test