minecraft:behavior.aquatic_charge_attack for you with a switch.Get GodCraftOverview
minecraft:behavior.aquatic_charge_attack is an entity component: it goes in the components object of a custom mob, or in one of its component groups. AI goal for water mobs that rush at their target and knock it back on hit, then rest before the next rush.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
max_charge_distance | number | 16 | The farthest a target can be for the mob to try a charge.Range: 0 to … |
charge_speed | number | 0.06 | How fast the mob swims while charging.Range: 0.05000000074505806 to … |
attack_reach | number | 0.05 | Extra distance added around the mob's hitbox that still counts as a hit.Range: 0 to … |
knockback_force | number | 2 | How hard the target is pushed when hit.Range: 0 to … |
charge_overshoot_distance | number | 1.5 | How far past the target the mob aims, so it rushes through instead of stopping short.Range: 0 to … |
charge_cooldown_time | FloatRange | {"max":6,"min":2} | Random wait range in seconds before the next charge. |
priority | integer | 0 | Lower numbers run first: when two goals compete, the one with the smaller priority wins.Range: 0 to … |
control_flags | Goal's control flags[] | none | Which body parts this goal takes over (move, look, jump), so goals using the same parts cannot run together. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:behavior.aquatic_charge_attack": {
"max_charge_distance": 16,
"charge_speed": 0.06,
"attack_reach": 0.05,
"knockback_force": 2,
"charge_overshoot_distance": 1.5,
"charge_cooldown_time": {
"max": 6,
"min": 2
},
"priority": 0,
"control_flags": []
}
}