Class OffsetsMask.Builder
java.lang.Object
com.sk89q.worldedit.function.mask.OffsetsMask.Builder
- Enclosing class:
- OffsetsMask
A builder for an
OffsetsMask
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build an offsets mask.excludeSelf
(boolean excludeSelf) Set whether the mask should fail if the original position matches.Set the mask to test.maxMatches
(int maxMatches) Set the maximum amount of matches allowed.minMatches
(int minMatches) Set the minimum amount of matches required.offsets
(Iterable<BlockVector3> offsets) Set the offsets to test.
-
Method Details
-
mask
Set the mask to test.- Parameters:
mask
- the mask to test- Returns:
- this builder, for chaining
-
excludeSelf
Set whether the mask should fail if the original position matches. Defaults tofalse
.- Parameters:
excludeSelf
-true
to exclude the original position if it matches- Returns:
- this builder, for chaining
-
minMatches
Set the minimum amount of matches required. Defaults to1
. Must be smaller than or equal to the max matches and theoffsets
size, and greater than or equal to0
.- Parameters:
minMatches
- the minimum amount of matches required- Returns:
- this builder, for chaining
-
maxMatches
Set the maximum amount of matches allowed. Defaults toInteger.MAX_VALUE
. Must be greater than or equal to minMatches(int).- Parameters:
maxMatches
- the maximum amount of matches allowed- Returns:
- this builder, for chaining
-
offsets
- Parameters:
offsets
- the offsets to test- Returns:
- this builder, for chaining
-
build
Build an offsets mask.- Returns:
- the new mask
-