Interface StaticMask

All Superinterfaces:
Mask
All Known Implementing Classes:
BinaryOperatorMask.Static, CylinderMask, NotMask.Static, SphereMask

public interface StaticMask extends Mask
A mask that is context-free. In other words, it doesn't require the current block state to determine if a relative position is a part of the mask.
Author:
Brady
  • Method Details

    • partOfMask

      boolean partOfMask(int x, int y, int z)
      Determines if a given relative coordinate is included in this mask, without the need for the current block state.
      Parameters:
      x - The relative x position of the block
      y - The relative y position of the block
      z - The relative z position of the block
      Returns:
      Whether the given position is included in this mask
    • partOfMask

      default boolean partOfMask(int x, int y, int z, net.minecraft.world.level.block.state.BlockState currentState)
      Implements the parent partOfMask function by calling the static function provided in this functional interface without needing the BlockState argument. This default implementation should NOT be overriden.
      Specified by:
      partOfMask in interface Mask
      Parameters:
      x - The relative x position of the block
      y - The relative y position of the block
      z - The relative z position of the block
      currentState - The current state of that block in the world, may be null
      Returns:
      Whether the given position is included in this mask
    • not

      default StaticMask not()
      Specified by:
      not in interface Mask
    • union

      default StaticMask union(StaticMask other)
    • intersection

    • xor

      default StaticMask xor(StaticMask other)
    • compute

      default StaticMask compute()
      Returns a pre-computed mask using this function, with the specified size parameters.