minecraft:behavior.swoop_attack
Allows an entity to attack using swoop attack behavior; Ideal for use with flying mobs. The behavior ends if the entity has a horizontal collision or gets hit.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
damage_reach | Decimal | 0.2 | Added to the base size of the entity, to determine the target's maximum allowable distance, when trying to deal attack damage. |
speed_multiplier | Decimal | 1 | During swoop attack behavior, this determines the multiplier the entity's speed is modified by when moving toward the target. |
delay_range | Object | {"max": 20, "min": 10} | Minimum and maximum cooldown time-range (in seconds) between each attempted swoop attack. |
min | Decimal | 0 | |
max | Decimal | 0 | |
priority | Integermin 0 | 0 | |
control_flags | List of text | [] |
Example from the game files
This is how vanilla Phantom uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:behavior.swoop_attack": {
"priority": 2
}
}Used by 1
Vanilla entities with minecraft:behavior.swoop_attack in their definition:
Related components
behavior.nearest_attackable_targetbehavior.melee_box_attackbehavior.ranged_attackbehavior.stomp_turtle_eggbehavior.leap_at_targetbehavior.nearest_prioritized_attackable_targetbehavior.aquatic_charge_attackbehavior.charge_held_itembehavior.guardian_attackbehavior.ocelotattackbehavior.slime_attackbehavior.charge_attackbehavior.delayed_attackbehavior.dragonchargeplayerbehavior.dragonflamingbehavior.dragonstrafeplayerbehavior.fire_at_targetbehavior.knockback_roarbehavior.melee_attackbehavior.ram_attackbehavior.roarbehavior.send_eventbehavior.sonic_boombehavior.stomp_attack