Class OffsetMask

java.lang.Object
com.sk89q.worldedit.function.mask.AbstractMask
com.sk89q.worldedit.function.mask.OffsetMask
All Implemented Interfaces:
Mask

public class OffsetMask extends AbstractMask
Checks whether another mask tests true for a position that is offset a given vector.
  • Constructor Details

    • OffsetMask

      @Deprecated public OffsetMask(Mask mask, BlockVector3 offset)
      Create a new instance.
      Parameters:
      mask - the mask
      offset - the offset
    • OffsetMask

      public OffsetMask(Mask mask, BlockVector3 offset, int minY, int maxY)
      Create a new instance.
      Parameters:
      mask - the mask
      offset - the offset
      minY - minimum allowable y value to be set. Inclusive.
      maxY - maximum allowable y value to be set. Inclusive.
  • Method Details

    • getMask

      public Mask getMask()
      Get the mask.
      Returns:
      the mask
    • setMask

      public void setMask(Mask mask)
      Set the mask.
      Parameters:
      mask - the mask
    • getOffset

      public BlockVector3 getOffset()
      Get the offset.
      Returns:
      the offset
    • setOffset

      public void setOffset(BlockVector3 offset)
      Set the offset.
      Parameters:
      offset - the offset
    • test

      public boolean test(BlockVector3 vector)
      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

      @Nullable public Mask2D 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

      public Mask copy()
      Description copied from interface: Mask
      Returns a copy of the mask. Usually for multi-threaded operation
      Returns:
      a clone of the mask