minecraft:insomnia for you with a switch.Get GodCraftOverview
minecraft:insomnia is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Tracks how long since the entity last slept, so phantoms can start spawning for it.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
days_until_insomnia | number | 3 | Days awake before phantoms start to appear. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:insomnia": {
"days_until_insomnia": 3
}
}