Entity Documentation - minecraft:attack
minecraft:attack
defines an entity's melee attack and any additional effects on its attack.
Parameters
Name | Default Value | Type | Description |
---|---|---|---|
damage | not set | Range [a, b] | The minimum and maximum amounts of damage the melee attack deals. A negative value can heal the entity instead of hurting it. |
effect_duration | 0.0 | Decimal | Duration in seconds of the status ailment applied to the damaged entity. |
effect_name | not set | String | Identifier of the status ailment to apply to an entity attacked by this entity's melee attack. |
Example
"minecraft:attack":{
"damage": 2,
"effect_duration": 10.0,
"effect_name": "poison"
}
Vanilla entities examples
zombie
"minecraft:attack": {
"damage": 3
}
wither_skeleton
"minecraft:attack": {
"damage": 4,
"effect_name": "wither",
"effect_duration": 10
}
Vanilla entities using minecraft:attack
- axolotl
- bee
- blaze
- cat
- cave_spider
- creeper
- dolphin
- drowned
- elder_guardian
- ender_crystal
- ender_dragon
- enderman
- endermite
- glow_squid
- fox
- goat
- guardian
- hoglin
- husk
- iron_golem
- magma_cube
- ocelot
- panda
- phantom
- pig
- piglin_brute
- piglin
- pillager
- player
- polar_bear
- ravager
- silverfish
- skeleton
- slime
- snow_golem
- spider
- squid
- stray
- vex
- vindicator
- wither skeleton
- wither
- wolf
- zoglin
- zombie pigman
- zombie_villager_v2
- zombie_villager
- zombie
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for