public static final class OffsetsMask.Builder
extends java.lang.Object
OffsetsMask
.Modifier and Type | Method and Description |
---|---|
OffsetsMask |
build()
Build an offsets mask.
|
OffsetsMask.Builder |
excludeSelf(boolean excludeSelf)
Set whether the mask should fail if the original position matches.
|
OffsetsMask.Builder |
mask(Mask mask)
Set the mask to test.
|
OffsetsMask.Builder |
maxMatches(int maxMatches)
Set the maximum amount of matches allowed.
|
OffsetsMask.Builder |
minMatches(int minMatches)
Set the minimum amount of matches required.
|
OffsetsMask.Builder |
offsets(java.lang.Iterable<BlockVector3> offsets)
Set the offsets to test.
|
public OffsetsMask.Builder mask(Mask mask)
mask
- the mask to testpublic OffsetsMask.Builder excludeSelf(boolean excludeSelf)
false
.excludeSelf
- true
to exclude the original position if it matchespublic OffsetsMask.Builder minMatches(int minMatches)
1
. Must be smaller than
or equal to the max matches and the offsets
size,
and greater than or equal to 0
.minMatches
- the minimum amount of matches requiredpublic OffsetsMask.Builder maxMatches(int maxMatches)
Integer.MAX_VALUE
. Must
be greater than or equal to minMatches(int).maxMatches
- the maximum amount of matches allowedpublic OffsetsMask.Builder offsets(java.lang.Iterable<BlockVector3> offsets)
offsets
- the offsets to testpublic OffsetsMask build()