minecraft:behavior.slime_random_direction for you with a switch.Get GodCraftOverview
minecraft:behavior.slime_random_direction is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Makes the mob turn to face a new random direction every so often, the way slimes wander.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
add_random_time_range | integer | 3 | Up to this many extra seconds, picked at random, are added to the wait. |
turn_range | integer | 360 | Largest angle, in degrees, the mob can turn when it picks a new direction. |
min_change_direction_time | number | 2 | Shortest wait, in seconds, before the mob picks a new direction. |
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_random_direction": {
"add_random_time_range": 3,
"turn_range": 360,
"min_change_direction_time": 2,
"priority": 0,
"control_flags": []
}
}