-
Notifications
You must be signed in to change notification settings - Fork 1
[Version 4.10] Attribute
Insane96 edited this page Jan 4, 2024
·
1 revision
-
uuid
: (String) uuid of the modifier. If omitted a random one will be generated. Multiple modifiers with the same UUID and attribute don't stack -
id
: (Resource location) id of the attribute, those are the ones available in vanilla minecraft. -
modifier_name
: (String) The name to identify the modifier -
amount
: (Range Object) representing the min and max possible modifier value of the attribute -
operation
: The modifier attribute as vanilla minecraft defines. Valid values are "addition", "multiply_base", "multiply_total" -
chance
: (Modifiable Value Object) representing the percentage chance (between 0 and 1) to apply the attribute modifier. If omitted the attribute will always be applied -
conditions
: (Conditions Object)
Multiple modifiers of the same attribute on the same mob will be additive.
E.g. a Zombie with 50% bonus health and another 100% bonus health will give 150% bonus health
This example will make spiders have between 15% and 30% more health on spawn.
{
"target": "minecraft:spider",
"attributes": [
{
"id": "minecraft:generic.max_health",
"modifier_name": "More Health for Spiders",
"amount": {
"min": 0.15,
"max": 0.30
},
"operation": "multiply_base"
}
]
}
This example gives to zombies:
- Between 0% and 15% more movement speed.
- Have 50% chance to get 20 more health (so a total of 40 health).
- 1-2/2-4/4-8 (in Easy/Normal/Hard) more armor.
{
"target": "minecraft:zombie",
"attributes": [
{
"id": "minecraft:generic.movement_speed",
"modifier_name": "Speedy Zombies",
"amount": {
"min": 0.00,
"max": 0.15
},
"operation": "multiply_base"
},
{
"id": "minecraft:generic.max_health",
"modifier_name": "+20hp for Zombies",
"amount": 20,
"chance": 0.50,
"operation": "addition"
},
{
"id": "minecraft:generic.armor",
"modifier_name": "Base armor for Zombies",
"amount": {
"min": {
"value": 2,
"difficulty_modifier": {
"operation": "add",
"easy": -1,
"normal": 0,
"hard": 2
}
},
"max": {
"value": 4,
"difficulty_modifier": {
"operation": "add",
"easy": -2,
"normal": 0,
"hard": 4
}
}
},
"operation": "addition"
}
]
}