minecraft:behavior.lay_down for you with a switch.Get GodCraftOverview
minecraft:behavior.lay_down 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 lie down now and then, like a panda.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
interval | integer | 120 | Gives a 1 in N chance to lie down, where N is this number. |
random_stop_interval | integer | 120 | Gives a 1 in N chance to get back up, where N is this number. |
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.lay_down": {
"interval": 120,
"random_stop_interval": 120,
"priority": 0,
"control_flags": []
}
}