Skip to content

Random Uniform

Calculates a pseudo-random number from the specified number range.

Type ID: kaya:random/uniform

Note

This number meta type can only provide the same kind of value of the field where it was used. (e.g: if the field is a float provider, the number provider to specify should be a float provider or if the field is an int provider, the number provider to specify should be an int provider)

Format

Field Type Default Description
min Number Provider The minimum bounds of the number.
max Number Provider The maximum bounds of the number.

Example

{
    "type": "kaya:random/uniform",
    "min": 1,
    "max": 64
}

This example is an int provider that will calculate an integer ranging from $1$ to $64$.

History

Minecraft Mod Changelog
1.21.5 0.1.0 Added the type.