-
Notifications
You must be signed in to change notification settings - Fork 1
[Version 4.0] Modifiable Value
Alberto edited this page Jun 22, 2023
·
3 revisions
The Modifiable Value object is used in the mod to set a value of a property.
This value can also be modified with modifiers.
-
modifiable_value
: the object that contains the modifiable values properties or a numeric value.-
value
: the value -
round
: the decimal places to round "value" to after applying modifiers -
conditions_modifier
: A list of conditions modifiers- One condition modifier
-
condition
: Same object as theconditions
one in mobs properties -
amount
: The amount to apply tovalue
if the conditions are fulfilled -
operation
: A string value (allowed values: "add", "multiply") representing ifamount
should affectvalue
additively or multiplicatively
-
- One condition modifier
-
Those are the base keys, after those, modifiers objects can be added, such as Difficulty Modifier. Check the sidebar for all the modifiers. 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, will result as 3.
This:
"modifiable_value": 10
equals to:
"modifiable_value": {
"value": 10
}
Simple round example. This will round the value to 8:
"modifiable_value": {
"value": 8.25,
"round": 0
}
Check other properties pages for examples.