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
ConstructorDescriptionOffsetMask
(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.void
Set the mask.void
setOffset
(BlockVector3 offset) Set the offset.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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:Mask
Returns true if the criteria is met.- 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.- 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- Returns:
- a clone of the mask
-
OffsetMask(Mask, BlockVector3, int, int)