Int provider

Helpers that build a minecraft:int_provider object, one for each of its types. Where a field takes one, write the helper's call; its name is the type it makes. Click a type to see what it accepts.

BiasedToBottom

BiasedToBottom

A random whole number from min_inclusive to max_inclusive, with low values more likely.

BiasedToBottom(min_inclusive, max_inclusive)
min_inclusive
int
max_inclusive
int

Clamped

Clamped

Another provider's value, kept from min_inclusive to max_inclusive.

Clamped(min_inclusive, max_inclusive, source)
min_inclusive
int
max_inclusive
int
source
IntProvider of int

The provider to clamp.

ClampedNormal

ClampedNormal

A whole number from a bell curve around mean, kept from min_inclusive to max_inclusive.

ClampedNormal(min_inclusive, max_inclusive, mean, deviation)
min_inclusive
int
max_inclusive
int
mean
number

The most likely value.

deviation
number

How widely values spread around mean.

Constant

Constant

Always the same whole number. A plain number does the same thing.

Constant(value)
value
int

Trapezoid

Trapezoid

A whole number from min to max, most likely in a middle band plateau wide and less likely toward the ends.

Trapezoid(min, max, plateau)
min
int
max
int
plateau
int

Width of the most likely band in the middle. 0 gives a triangle.

Uniform

Uniform

A random whole number from min_inclusive to max_inclusive, each equally likely. Usually written as a range, 2..5.

Uniform(min_inclusive, max_inclusive)
min_inclusive
int

The smallest value.

max_inclusive
int

The largest value.

PlacedFeature some_iron { feature = minecraft:ore_iron, placement = [Count(Uniform(2, 5)), InSquare()] }

VeryBiasedToBottom

VeryBiasedToBottom

Like BiasedToBottom, with low values even more likely.

VeryBiasedToBottom(min_inclusive, max_inclusive)
min_inclusive
int
max_inclusive
int

WeightedList

WeightedList

Picks one of several providers by weight.

WeightedList(distribution)
distribution
NonEmptyWeightedList of IntProvider of int