1. Wiki
  2. /Entities
  3. /minecraft:behavior.eat_mob

minecraft:behavior.eat_mob

Don't want to write this by hand? GodCraft sets minecraft:behavior.eat_mob for you with a switch.Get GodCraft

Overview

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

FieldTypeDefaultDescription
run_speednumber1Speed while running to the prey.
eat_animation_timenumber1Seconds the eating animation plays.
pull_in_forcenumber1How strongly the prey is pulled toward the eater.
reach_mob_distancenumber1How close the mob must be to start eating.
eat_mob_soundstring""Sound played when the mob eats its prey.
loot_tablestring""Loot table for items dropped when the prey is eaten.
priorityinteger0Lower numbers run first: when two goals compete, the one with the smaller priority wins.Range: 0 to …
control_flagsGoal's control flags[]noneWhich 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": []
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more