minecraft:behavior.slime_attack for you with a switch.Get GodCraftOverview
minecraft:behavior.slime_attack is an entity component: it goes in the components object of a custom mob, or in one of its component groups. The jumping attack used by slimes and magma cubes. Now and then the mob gets tired and stops attacking for a moment.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
x_max_rotation | number | 10 | How far, in degrees, the mob can tilt up or down while facing the target. |
y_max_rotation | number | 10 | How far, in degrees, the mob can turn sideways while facing the target. |
speed_multiplier | number | 1 | Speed multiplier while moving toward the target. |
grow_tired_cooldown_time | number | 15 | How long, in seconds, the mob rests after getting tired before it attacks again. |
set_persistent | boolean | false | If true, the mob will not despawn after it targets a player. |
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.slime_attack": {
"x_max_rotation": 10,
"y_max_rotation": 10,
"speed_multiplier": 1,
"grow_tired_cooldown_time": 15,
"set_persistent": false,
"priority": 0,
"control_flags": []
}
}