minecraft:behavior.beg for you with a switch.Get GodCraftOverview
minecraft:behavior.beg is an entity component: it goes in the components object of a custom mob, or in one of its component groups. AI goal that makes the mob stare at and follow a player holding food it likes, like a wolf tilting its head.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
items | Item Descriptor[] | none | Foods that make the mob beg. |
look_distance | number | 8 | How close, in blocks, the player must be for begging to start. |
look_time | IntRange | {"max":4,"min":2} | Random range in seconds the mob keeps staring at the player. |
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.beg": {
"items": [],
"look_distance": 8,
"look_time": {
"max": 4,
"min": 2
},
"priority": 0,
"control_flags": []
}
}