-
Notifications
You must be signed in to change notification settings - Fork 1
[1.12] Chance
Alberto Del Villano edited this page Feb 10, 2022
·
2 revisions
The chance object is used to set the percentage chance from something to happen, e.g. enchant an item or apply a potion effect.
-
chance: (Object) the object that contains all the chance properties
- amount: percentage chance to do something.
- affected_by_difficulty: if the chance should be affected by difficulty or local difficulty (optional, defaults to false, but if is_local_difficulty is true and this is omitted, this will default to true)
- is_local_difficulty: (true/false) if the chance should be multiplied by the local difficulty, instead of Easy (x0.5), Normal (x1.0) or Hard (x2.0) (by default, those values can be changed globally in the config). (optional, defaults to false)
- multiplier: multiplier for the difficulty, or local difficulty (optional, defaults to 1.0)
{
"mob_id": "minecraft:zombie",
"potion_effects": [
{
"id": "minecraft:fire_resistance",
"chance": {
"amount": 30.0,
"affected_by_difficulty": true,
"is_local_difficulty": true,
"multiplier": 1.5
},
"amplifier": 0
}
]
}