minecraft:behavior.dragonstrafeplayer
Allows this entity to fly around looking for a player to shoot fireballs at. Can only be used by the Ender Dragon.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
switch_direction_probability | Decimal0 to 1 | 0.125 | Percent chance to to switch this entity's strafe direction between clockwise and counterclockwise. Switch direction chance occurs each time a new target is chosen (1.0 = 100%). |
target_in_range_and_in_view_time | Decimal | 0.25 | Time (in seconds) the target must be in fireball range, and in view [ie, no solid terrain in-between the target and this entity], before a fireball can be shot. |
fireball_range | Decimal | 64 | Maximum distance of this entity's fireball attack while strafing. |
view_angle | Decimal | 10 | The target must be within "view_angle" degrees of the dragon's current rotation before a fireball can be shot. |
active_speed | Decimalmin 0 | 0.6 | The speed this entity moves when this behavior has started or while it's active. |
flight_speed | Decimalmin 0 | 0.6 | The speed this entity moves while this behavior is not active. |
turn_speed | Decimalmin 0 | 0.7 | The speed at which this entity turns while using this behavior. |
target_zone | Object | {"max": 150, "min": 10} | Minimum and maximum distance, from the target, this entity can use this behavior. |
min | Decimal | 0 | |
max | Decimal | 0 | |
priority | Integermin 0 | 0 | |
control_flags | List of text | [] |
Example from the game files
This is how vanilla Ender Dragon uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:behavior.dragonstrafeplayer": {
"priority": 2
}
}Used by 1
Vanilla entities with minecraft:behavior.dragonstrafeplayer 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.fire_at_targetbehavior.knockback_roarbehavior.melee_attackbehavior.ram_attackbehavior.roarbehavior.send_eventbehavior.sonic_boombehavior.stomp_attackbehavior.summon_entity