-
Notifications
You must be signed in to change notification settings - Fork 1
[1.16+] Range
Insane96 edited this page Jun 30, 2022
·
3 revisions
The Range object is used in the mod to set a min and max value of a property.
This value can also be modified with modifiers.
-
range
: (Object) the object that contains all the range properties or a numeric value setting both min and max to that value.-
min
: minimum value -
max
: maximum value. Can be omitted and will be equal to min -
round
: the decimal places to round the random value between min and max after applying modifiers
-
Those are the base keys, after those, modifiers objects can be added, such as Difficulty Modifier. Modifiers of integer values will have the decimal part truncated. E.g. An enchantment level of 2 when modified by difficulty goes to 3.4, the result will be 3.
This:
"range": 10
equals to:
"range": {
"min": 10,
"max": 10
}
Simple round example. This will round the value to the nearest integer:
"range": {
"min": 0,
"max": 5,
"round": 0
}
Check Examples for a few use cases