Interface IntProvider

All Superinterfaces:
Wrapper
All Known Implementing Classes:
IntProvider.BiasedToBottom, IntProvider.Clamped, IntProvider.ClampedNormal, IntProvider.Constant, IntProvider.Trapezoid, IntProvider.Uniform, IntProvider.WeightedListInt

Wraps the IntProvider value-provider family. Sampling occurs NMS-side, so this wrapper only carries the bounds/shape parameters.
Since:
2.3.0
  • Field Details

  • Method Details

    • constant

      @AsOf("2.3.0") static IntProvider constant(int value)
    • uniform

      @AsOf("2.3.0") static IntProvider uniform(int minInclusive, int maxInclusive)
    • biasedToBottom

      @AsOf("2.3.0") static IntProvider biasedToBottom(int minInclusive, int maxInclusive)
    • clampedNormal

      @AsOf("2.3.0") static IntProvider clampedNormal(float mean, float deviation, int minInclusive, int maxInclusive)
    • trapezoid

      @AsOf("2.3.0") static IntProvider trapezoid(int minInclusive, int maxInclusive, int plateau)
    • triangle

      @AsOf("2.3.0") static IntProvider triangle(int range)
      A symmetric triangular distribution over [-range, range], matching TrapezoidInt.triangle.
    • clamped

      @AsOf("2.3.0") static IntProvider clamped(IntProvider source, int minInclusive, int maxInclusive)
    • weightedList

      @AsOf("2.3.0") static IntProvider weightedList(WeightedList<IntProvider> distribution)
    • minInclusive

      @AsOf("2.3.0") int minInclusive()
      The smallest value this provider can yield.
      Returns:
      the smallest value this provider can yield.
      Since:
      2.3.0
    • maxInclusive

      @AsOf("2.3.0") int maxInclusive()
      The largest value this provider can yield.
      Returns:
      the largest value this provider can yield.
      Since:
      2.3.0
    • toMinecraft

      @AsOf("2.3.0") default Object toMinecraft()
      Description copied from interface: Wrapper
      Convert this handle to the real Minecraft object.
      Specified by:
      toMinecraft in interface Wrapper
      Returns:
      the real Minecraft object