minecraft:behavior.eat_mob for you with a switch.Get GodCraftOverview
minecraft:behavior.eat_mob 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 go up to another mob and eat it, like a frog eating a slime.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
run_speed | number | 1 | Speed while running to the prey. |
eat_animation_time | number | 1 | Seconds the eating animation plays. |
pull_in_force | number | 1 | How strongly the prey is pulled toward the eater. |
reach_mob_distance | number | 1 | How close the mob must be to start eating. |
eat_mob_sound | string | "" | Sound played when the mob eats its prey. |
loot_table | string | "" | Loot table for items dropped when the prey is eaten. |
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.eat_mob": {
"run_speed": 1,
"eat_animation_time": 1,
"pull_in_force": 1,
"reach_mob_distance": 1,
"eat_mob_sound": "",
"loot_table": "",
"priority": 0,
"control_flags": []
}
}