minecraft:behavior.stomp_attack for you with a switch.Get GodCraftOverview
minecraft:behavior.stomp_attack is an entity component: it goes in the components object of a custom mob, or in one of its component groups. A melee attack that stomps the ground and hurts everything in an area around the target, not just one mob. It has the usual melee settings plus range controls for the stomp.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
stomp_range_multiplier | number | 2 | Multiplied with the mob's size to get how wide the stomp damage reaches. |
no_damage_range_multiplier | number | 2 | Part of the stomp range, near the middle, that deals no damage. If the target is inside it, the attack goes on cooldown. |
reach_multiplier | number | 2 | Multiplied with the mob's size to decide how close it must be before it tries to hit.Range: 0 to … |
on_kill | ActorDefinitionTrigger | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Event that runs when this mob kills its target. |
cooldown_time | number | 1 | Seconds between attacks.Range: 0 to … |
x_max_rotation | number | 30 | How far, in degrees, the mob can tilt up or down while looking at the target.Range: 0 to … |
y_max_head_rotation | number | 30 | How far, in degrees, the mob can turn its head sideways while looking at the target.Range: 0 to … |
random_stop_interval | integer | 0 | Gives a 1 in N chance to stop the current attack, where N is this value. Use 0 to never stop at random.Range: 0 to … |
attack_once | boolean | false | If true, the mob only ever does this attack once in its life. |
can_spread_on_fire | boolean | false | If true, a burning mob with an empty hand sets its target on fire when it hits. |
min_path_time | number | 0.2 | Shortest base time, in seconds, before the mob plans a new path to the target.Range: 0 to … |
max_path_time | number | 0.55 | Longest base time, in seconds, before the mob plans a new path to the target.Range: 0 to … |
path_fail_time_increase | number | 0.75 | Extra seconds added before planning a new path when the mob can't follow its current one.Range: 0 to … |
inner_boundary_time_increase | number | 0.25 | Extra seconds added before planning a new path when the target is farther than path_inner_boundary.Range: 0 to … |
outer_boundary_time_increase | number | 0.5 | Extra seconds added before planning a new path when the target is farther than path_outer_boundary.Range: 0 to … |
path_inner_boundary | number | 16 | Distance past which inner_boundary_time_increase is added.Range: 0 to … |
path_outer_boundary | number | 32 | Distance past which outer_boundary_time_increase is added.Range: 0 to … |
speed_multiplier | number | 1 | Speed multiplier while moving toward the target.Range: 0 to … |
require_complete_path | boolean | false | If true, the mob only chases a target it has a full path to. |
track_target | boolean | false | If true, the mob keeps tracking the target even without a built-in way to sense it. |
attack_types | string | "" | Which entity types this mob will attack. |
on_attack | ActorDefinitionTrigger | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Event that runs each time the mob lands a hit. |
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.stomp_attack": {
"stomp_range_multiplier": 2,
"no_damage_range_multiplier": 2,
"reach_multiplier": 2,
"on_kill": {
"event": "",
"filters": {
"AND": null,
"NOT": null,
"OR": null,
"all": null,
"all_of": null,
"any": null,
"any_of": null,
"none_of": null
},
"target": "self"
},
"cooldown_time": 1,
"x_max_rotation": 30,
"y_max_head_rotation": 30,
"random_stop_interval": 0
}
}