Interface IntProvider
- All Superinterfaces:
Wrapper
- All Known Implementing Classes:
IntProvider.BiasedToBottom, IntProvider.Clamped, IntProvider.ClampedNormal, IntProvider.Constant, IntProvider.Trapezoid, IntProvider.Uniform, IntProvider.WeightedListInt
@NullMarked
@AsOf("2.3.0")
public sealed interface IntProvider
extends Wrapper
permits IntProvider.Constant, IntProvider.Uniform, IntProvider.BiasedToBottom, IntProvider.ClampedNormal, IntProvider.Trapezoid, IntProvider.Clamped, 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
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordstatic final recordstatic final recordstatic final recordstatic interfacestatic final recordstatic final recordstatic final recordNested classes/interfaces inherited from interface Wrapper
Wrapper.Context<C> -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic IntProviderbiasedToBottom(int minInclusive, int maxInclusive) static IntProviderclamped(IntProvider source, int minInclusive, int maxInclusive) static IntProviderclampedNormal(float mean, float deviation, int minInclusive, int maxInclusive) static IntProviderconstant(int value) intThe largest value this provider can yield.intThe smallest value this provider can yield.default ObjectConvert this handle to the real Minecraft object.static IntProvidertrapezoid(int minInclusive, int maxInclusive, int plateau) static IntProvidertriangle(int range) A symmetric triangular distribution over [-range, range], matching TrapezoidInt.triangle.static IntProvideruniform(int minInclusive, int maxInclusive) static IntProviderweightedList(WeightedList<IntProvider> distribution)
-
Field Details
-
WIRE
-
-
Method Details
-
constant
-
uniform
-
biasedToBottom
-
clampedNormal
@AsOf("2.3.0") static IntProvider clampedNormal(float mean, float deviation, int minInclusive, int maxInclusive) -
trapezoid
-
triangle
A symmetric triangular distribution over [-range, range], matching TrapezoidInt.triangle. -
clamped
-
weightedList
-
minInclusive
The smallest value this provider can yield.- Returns:
- the smallest value this provider can yield.
- Since:
- 2.3.0
-
maxInclusive
The largest value this provider can yield.- Returns:
- the largest value this provider can yield.
- Since:
- 2.3.0
-
toMinecraft
Description copied from interface:WrapperConvert this handle to the real Minecraft object.- Specified by:
toMinecraftin interfaceWrapper- Returns:
- the real Minecraft object
-