minecraft:behavior.eat_mob
Allows the entity to eat a specified Mob.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
run_speed | Decimal | 1 | Sets the entity's speed when running toward the target. |
eat_animation_time | Decimal | 1 | Sets the time in seconds the eat animation should play for. |
pull_in_force | Decimal | 1 | Sets the force which the mob-to-be-eaten is pulled towards the eating mob. |
reach_mob_distance | Decimal | 1 | Sets the desired distance to be reached before eating the mob. |
eat_mob_sound | Text | "" | Sets the sound that should play when eating a mob. |
loot_table | Text | "" | The loot table for loot to be dropped when eating a mob. |
priority | Integermin 0 | 0 | |
control_flags | List of text | [] |
Example from the game files
This is how vanilla Frog uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:behavior.eat_mob": {
"run_speed": 2,
"eat_animation_time": 0.3,
"pull_in_force": 0.75,
"reach_mob_distance": 1.75,
"eat_mob_sound": "tongue",
"loot_table": "loot_tables/entities/frog.json",
"priority": 7
}
}Used by 1
Vanilla entities with minecraft:behavior.eat_mob in their definition:
Related components
behavior.pickup_itemsbehavior.move_to_villagebehavior.harvest_farm_blockbehavior.lay_eggbehavior.move_indoorsbehavior.move_outdoorsbehavior.place_blockbehavior.raid_gardenbehavior.digbehavior.dragonscanningbehavior.drop_item_forbehavior.eat_blockbehavior.eat_carried_itembehavior.fertilize_farm_blockbehavior.hold_groundbehavior.inspect_bookshelfbehavior.move_through_villagebehavior.open_doorbehavior.random_search_and_digbehavior.restrict_open_doorbehavior.snackingbehavior.stroll_towards_villagebehavior.take_blockbehavior.transport_items