minecraft:behavior.charge_attack
Allows this entity to damage a target by using a running attack.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
min_distance | Decimal | 2 | A charge attack cannot start if the entity is closer than this distance to the target. |
max_distance | Decimal | 3 | A charge attack cannot start if the entity is farther than this distance to the target. |
speed_multiplier | Decimal | 1 | Modifies the entity's speed when charging toward the target. |
success_rate | Decimal | 0.1428 | Percent chance this entity will start a charge attack, if not already attacking (1.0 = 100%). |
sound_event | Textitem.use.on, hit, step, step.baby, fly, jump, jump.prevent, break, place, heavy.step, gallop, fall, hurt, hurt.baby, hurt.in.water, death, death.baby, death.in.water, death.to.zombie, ambient, ambient.baby, ambient.in.water, ambient.in.air, ambient.tame … | "charge" | |
priority | Integermin 0 | 0 | |
control_flags | List of text | [] |
Example from the game files
This is how vanilla Vex uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:behavior.charge_attack": {
"priority": 4
}
}Used by 1
Vanilla entities with minecraft:behavior.charge_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.delayed_attackbehavior.dragonchargeplayerbehavior.dragonflamingbehavior.dragonstrafeplayerbehavior.fire_at_targetbehavior.knockback_roarbehavior.melee_attackbehavior.ram_attackbehavior.roarbehavior.send_eventbehavior.sonic_boombehavior.stomp_attackbehavior.summon_entity