minecraft:behavior.follow_caravan for you with a switch.Get GodCraftOverview
minecraft:behavior.follow_caravan is an entity component: it goes in the components object of a custom mob, or in one of its component groups. AI goal that lets the mob join a line of mobs and follow the one in front, like llamas on leads.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
speed_multiplier | number | 1 | Speed multiplier while following the caravan. |
entity_count | integer | 1 | How many mobs can be in one caravan. |
entity_types | EntityTypes | none | Which entities this mob can follow in a caravan. |
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.follow_caravan": {
"speed_multiplier": 1,
"entity_count": 1,
"entity_types": {},
"priority": 0,
"control_flags": []
}
}