Interface ValueProvider

All Superinterfaces:
Comparable<ValueProvider>, Wrapper
All Known Subinterfaces:
BiasedToBottomInt, ClampedInt, ClampedNormalFloat, ClampedNormalInt, ConstantFloat, ConstantInt, FloatProvider, IntProvider, TrapezoidFloat, TrapezoidInt, UniformFloat, UniformInt, WeightedListInt

@NullMarked @AsOf("3.0.0") public interface ValueProvider extends Wrapper, Comparable<ValueProvider>
A Wrapper over a numeric value-provider family whose members expose a range of yieldable values. Both IntProvider and FloatProvider extend this, so providers are mutually Comparable across the int and float families: ordering is by min() first, then max(), each viewed as a double.
Since:
3.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
     
    double
    max()
    The largest value this provider can yield, as a double.
    double
    min()
    The smallest value this provider can yield, as a double.

    Methods inherited from interface Wrapper

    asHandle, toMinecraft, unwrap
  • Method Details

    • min

      @AsOf("3.0.0") double min()
      The smallest value this provider can yield, as a double.
      Returns:
      the smallest value this provider can yield
      Since:
      3.0.0
    • max

      @AsOf("3.0.0") double max()
      The largest value this provider can yield, as a double.
      Returns:
      the largest value this provider can yield
      Since:
      3.0.0
    • compareTo

      default int compareTo(ValueProvider other)
      Specified by:
      compareTo in interface Comparable<ValueProvider>