minecraft:behavior.sonic_boom for you with a switch.Get GodCraftOverview
minecraft:behavior.sonic_boom is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Lets the mob charge up and fire a sonic boom blast at its target, which goes through walls and armor. This is the warden's ranged attack.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
duration | number | 0 | How long the whole attack lasts, in seconds.Range: 0 to … |
speed_multiplier | number | 1 | Speed multiplier while moving toward the target. |
attack_damage | number | 30 | How much damage the blast deals. |
attack_range_horizontal | number | 15 | How far sideways the blast can reach the target. |
attack_range_vertical | number | 20 | How far up or down the blast can reach the target. |
attack_cooldown | number | 5 | Seconds the mob waits after a blast before it can use it again. |
knockback_vertical_strength | number | 0 | How hard the blast throws the target upward. |
knockback_horizontal_strength | number | 0 | How hard the blast pushes the target away. |
knockback_height_cap | number | 0 | Limits how high the knockback can lift the target. |
duration_until_attack_sound | number | 1.7 | Seconds after the start before the attack sound plays. |
attack_sound | string | "" | Sound played when the blast fires. |
charge_sound | string | "" | Sound played while the blast charges up. |
priority | integer | 0 | Decides which goal wins when several want to run: lower numbers run first.Range: 0 to … |
control_flags | Goal's control flags[] | none | Lists the body parts this goal takes control of (such as move, look or jump), so goals that need the same part don't run together. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:behavior.sonic_boom": {
"duration": 0,
"speed_multiplier": 1,
"attack_damage": 30,
"attack_range_horizontal": 15,
"attack_range_vertical": 20,
"attack_cooldown": 5,
"knockback_vertical_strength": 0,
"knockback_horizontal_strength": 0
}
}