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