Class OffsetMask
java.lang.Object
com.sk89q.worldedit.function.mask.AbstractMask
com.sk89q.worldedit.function.mask.OffsetMask
- All Implemented Interfaces:
Mask
Checks whether another mask tests true for a position that is offset
a given vector.
-
Constructor Summary
ConstructorsConstructorDescriptionOffsetMask(Mask mask, BlockVector3 offset) Deprecated.OffsetMask(Mask mask, BlockVector3 offset, int minY, int maxY) Create a new instance. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Returns a copy of the mask.getMask()Get the mask.Get the offset.voidSet the mask.voidsetOffset(BlockVector3 offset) Set the offset.booleantest(BlockVector3 vector) Returns true if the criteria is met.toMask2D()Get the 2D version of this mask if one exists.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sk89q.worldedit.function.mask.Mask
inverse, optimize, replacesAir, toFilter, toFilter, tryCombine, tryOptimize, tryOr
-
Constructor Details
-
OffsetMask
Deprecated.Create a new instance.- Parameters:
mask- the maskoffset- the offset
-
OffsetMask
Create a new instance.- Parameters:
mask- the maskoffset- the offsetminY- minimum allowable y value to be set. Inclusive.maxY- maximum allowable y value to be set. Inclusive.
-
-
Method Details
-
getMask
Get the mask.- Returns:
- the mask
-
setMask
Set the mask.- Parameters:
mask- the mask
-
getOffset
Get the offset.- Returns:
- the offset
-
setOffset
Set the offset.- Parameters:
offset- the offset
-
test
Description copied from interface:MaskReturns true if the criteria is met.- 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.- 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- Returns:
- a clone of the mask
-
OffsetMask(Mask, BlockVector3, int, int)