Interface AxisAlignedLinearPosTest

All Superinterfaces:
PosRuleTest, Wrapper

@NullMarked @AsOf("3.4.0") public interface AxisAlignedLinearPosTest extends PosRuleTest
Passes with a chance that moves linearly with the block's distance from the template's origin, measured along one axis.
Since:
3.4.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    The axis distance is measured along.
    float
    The chance at the maximum distance.
    int
    The distance the maximum chance applies at.
    float
    The chance at the minimum distance.
    int
    The distance the minimum chance applies at.
    of(float minChance, float maxChance, int minDist, int maxDist, Axis axis)
    Creates a new test.

    Methods inherited from interface Wrapper

    asHandle, toMinecraft, unwrap
  • Method Details

    • minChance

      @AsOf("3.4.0") float minChance()
      The chance at the minimum distance.
      Returns:
      the minimum chance
      Since:
      3.4.0
    • maxChance

      @AsOf("3.4.0") float maxChance()
      The chance at the maximum distance.
      Returns:
      the maximum chance
      Since:
      3.4.0
    • minDist

      @AsOf("3.4.0") int minDist()
      The distance the minimum chance applies at.
      Returns:
      the minimum distance
      Since:
      3.4.0
    • maxDist

      @AsOf("3.4.0") int maxDist()
      The distance the maximum chance applies at.
      Returns:
      the maximum distance
      Since:
      3.4.0
    • axis

      @AsOf("3.4.0") Axis axis()
      The axis distance is measured along.
      Returns:
      the axis
      Since:
      3.4.0
    • of

      @AsOf("3.4.0") static AxisAlignedLinearPosTest of(float minChance, float maxChance, int minDist, int maxDist, Axis axis)
      Creates a new test.
      Parameters:
      minChance - the chance at the minimum distance
      maxChance - the chance at the maximum distance
      minDist - the distance the minimum chance applies at
      maxDist - the distance the maximum chance applies at
      axis - the axis distance is measured along
      Returns:
      the test
      Since:
      3.4.0