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
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Returns a copy of the mask.static Maskbooleanbooleantest(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:
pairingFunctionin classMaskIntersection
-
test
Description copied from interface:MaskReturns true if the criteria is met.- Specified by:
testin interfaceMask- Overrides:
testin classMaskIntersection- Parameters:
vector- the vector to test- Returns:
- true if the criteria is met
-
toMask2D
Description copied from interface:MaskGet the 2D version of this mask if one exists.- Specified by:
toMask2Din interfaceMask- Overrides:
toMask2Din classMaskIntersection- Returns:
- a 2D mask version or
nullif this mask can't be 2D
-
copy
Description copied from interface:MaskReturns a copy of the mask. Usually for multi-threaded operation- Specified by:
copyin interfaceMask- Overrides:
copyin classMaskIntersection- Returns:
- a clone of the mask
-
replacesAir
public boolean replacesAir()- Specified by:
replacesAirin interfaceMask- Overrides:
replacesAirin classMaskIntersection
-