Interface LinearPosTest

All Superinterfaces:
PosRuleTest, Wrapper

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

    Modifier and Type
    Method
    Description
    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)
    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
    • of

      @AsOf("3.4.0") static LinearPosTest of(float minChance, float maxChance, int minDist, int maxDist)
      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
      Returns:
      the test
      Since:
      3.4.0