Class MaskUnion
java.lang.Object
com.sk89q.worldedit.function.mask.AbstractMask
com.sk89q.worldedit.function.mask.MaskIntersection
com.sk89q.worldedit.function.mask.MaskUnion
- All Implemented Interfaces:
Mask
Combines several masks and requires that one or more masks return true
when a certain position is tested. It serves as a logical OR operation
on a list of masks.
-
Field Summary
Fields inherited from class com.sk89q.worldedit.function.mask.MaskIntersection
defaultReturn, masks, masksArray
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Returns a copy of the mask.static Mask
boolean
boolean
test
(BlockVector3 vector) Returns true if the criteria is met.toMask2D()
Get the 2D version of this mask if one exists.Methods inherited from class com.sk89q.worldedit.function.mask.MaskIntersection
add, add, getMasks, getMasksArray, tryOptimize
-
Constructor Details
-
MaskUnion
Create a new union.- Parameters:
masks
- a list of masks
-
MaskUnion
Create a new union.- Parameters:
mask
- a list of masks
-
-
Method Details
-
of
-
pairingFunction
- Overrides:
pairingFunction
in classMaskIntersection
-
test
Description copied from interface:Mask
Returns true if the criteria is met.- Specified by:
test
in interfaceMask
- Overrides:
test
in classMaskIntersection
- Parameters:
vector
- the vector to test- Returns:
- true if the criteria is met
-
toMask2D
Description copied from interface:Mask
Get the 2D version of this mask if one exists.- Specified by:
toMask2D
in interfaceMask
- Overrides:
toMask2D
in classMaskIntersection
- Returns:
- a 2D mask version or
null
if this mask can't be 2D
-
copy
Description copied from interface:Mask
Returns a copy of the mask. Usually for multi-threaded operation- Specified by:
copy
in interfaceMask
- Overrides:
copy
in classMaskIntersection
- Returns:
- a clone of the mask
-
replacesAir
public boolean replacesAir()- Specified by:
replacesAir
in interfaceMask
- Overrides:
replacesAir
in classMaskIntersection
-