minecraft:area_attack
Dynamic value
Properties
This component has no properties in the official schema: add it as an empty object {} to switch the behaviour on.
Example from the game files
This is how vanilla Pufferfish uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:area_attack": {
"cause": "contact",
"damage_cooldown": 0.5,
"damage_per_tick": 2,
"damage_range": 0.2,
"entity_filter": {
"any_of": [
{
"all_of": [
{
"subject": "other",
"test": "is_family",
"value": "mob"
},
{
"any_of": [
{
"subject": "other",
"test": "is_family",
"value": "axolotl"
},
{
"operator": "not",
"test": "is_family",
"subject": "other",
"value": "aquatic"
}
]
}
]
},
{
"all_of": [
{
"subject": "other",
"test": "is_family",
"value": "player"
},
{
"operator": "not",
"test": "has_ability",
"subject": "other",
"value": "instabuild"
}
]
}
]
}
}
}Used by 4
Vanilla entities with minecraft:area_attack in their definition: