Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Allows an entity to define an entity's melee attack and any additional effects on it's attack.
Attack Properties
Name | Default Value | Type | Description | Example Values |
---|---|---|---|---|
damage | not set | Range of floats | Range of the random amount of damage the melee attack deals. A negative value can heal the entity instead of hurting it. | Axolotl: 2 , Blaze: 6 , Bogged: 3 |
effect_duration | 0 | Decimal number | Duration in seconds of the status ailment applied to the damaged entity. | Bee: 10 , 18 , Cave Spider: 7 , 15 |
effect_name | not set | String | Identifier of the status ailment to apply to an entity attacked by this entity's melee attack. | Bee: "poison" , Husk: "hunger" , Stray: "slowness" |
Samples
Axolotl
"minecraft:attack": {
"damage": 2
}
Bee
At /minecraft:entity/component_groups/normal_attack/minecraft:attack/:
"minecraft:attack": {
"damage": 2,
"effect_name": "poison",
"effect_duration": 10
}
At /minecraft:entity/component_groups/hard_attack/minecraft:attack/:
"minecraft:attack": {
"damage": 2,
"effect_name": "poison",
"effect_duration": 18
}
Blaze
"minecraft:attack": {
"damage": 6
}
Bogged
"minecraft:attack": {
"damage": 3
}
Cave Spider
At /minecraft:entity/component_groups/minecraft:spider_poison_easy/minecraft:attack/:
"minecraft:attack": {
"damage": 2,
"effect_name": "poison",
"effect_duration": 0
}
At /minecraft:entity/component_groups/minecraft:spider_poison_normal/minecraft:attack/:
"minecraft:attack": {
"damage": 2,
"effect_name": "poison",
"effect_duration": 7
}
At /minecraft:entity/component_groups/minecraft:spider_poison_hard/minecraft:attack/:
"minecraft:attack": {
"damage": 2,
"effect_name": "poison",
"effect_duration": 15
}
Elder Guardian
"minecraft:attack": {
"damage": 5
}
Enderman
"minecraft:attack": {
"damage": 7
}
Goat
At /minecraft:entity/component_groups/goat_baby/minecraft:attack/:
"minecraft:attack": {
"damage": 1
}
Hoglin
At /minecraft:entity/component_groups/minecraft:hoglin_adult/minecraft:attack/:
"minecraft:attack": {
"damage": [
3,
9
]
}