1. Wiki
  2. /Entities
  3. /minecraft:insomnia

minecraft:insomnia

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

Overview

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

FieldTypeDefaultDescription
days_until_insomnianumber3Days 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
  }
}

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