Changelog¶
Every change to Why Can't I Sleep?, newest first. 0.1.0 is the first release, a beta: everything below is in it.
0.1.0 Beta · Oct 26, 2026¶
✨ New Features¶
- Project set up for Fabric and NeoForge (Minecraft 26.1 to 26.1.2), built on CoolCatLib: Core and CoolCatLib: Canvas.
- Monster highlights: when monsters keep you from sleeping, exactly the ones that blocked it (the game's own check range) glow for a few seconds, colored by the kind of threat or in one color. Only you see it; a server can also show it to players without the mod through the game's glowing effect.
- Off-screen arrows: arrows around the crosshair point to the blocking monsters you can't see, those outside your view and those behind blocks, in the same colors as their highlights and in three sizes. A solid arrow is a monster outside your view, a hollow one a monster behind blocks; nearer monsters get larger arrows, and arrows that would overlap fan apart.
- Sleep HUD: sleep messages no longer use the line above the hotbar. A soft, round-cornered dark card of the mod's own rises into place, with a wash of the message's color over its left side and specks of light drifting along it, an item for an icon in a square tinted that color, what happened and what to do about it; a blocked sleep reads "3 monsters nearby" over "Closest: Zombie, 6 blocks below". On a warning the wash throbs. The bedtime panel is a card in the same style, with each awake player's face beside their name.
- Visuals and sounds (CoolCatLib: Canvas): a heartbeat and a red wash over the screen when monsters block a sleep, and a dark mist on the blocking monsters in their highlight colors: a miasma pooling at their feet, wisps rising and darkening off their bodies, embers drifting up and now and then a pair of glinting eyes.
- Sleep explanations: every failed sleep says why and what to do: monsters nearby, the wrong time, too far from the bed, an obstructed or occupied bed, a night that can't be skipped, and how many more players must sleep.
- Dimension warning: the first use of a bed where beds explode (the Nether, the End) only warns; using it again within three seconds goes through.
- Bedtime panel (needs the mod on the server, and only shows with another player online): while you're in bed, a dark panel shows how many are asleep as a bar in segments, one per sleeper needed, and lists who is still awake and why, each with a colored dot, (awake, mining, fighting, AFK, in another dimension) with the progress toward the
playersSleepingPercentagerule. - Nudges: click an awake player on the board to send them a bell and a message, with a cooldown. Players without the mod get them too.
- Hiding under the bed: sneak and use a bed with empty hands to crawl under it. Lying there, nothing can see you: whatever was after you loses you, and if you stay still long enough (15 seconds by default) it gives up and is gone, along with the monsters prowling round the bed. You need a floor under the bed to hide on. Bosses (the Wither, the Ender Dragon, the Warden, Elder Guardians) aren't fooled: they still see you and keep coming. Trying to move or looking about wildly while monsters are near shows a warning to hold still. Sneak to come out; being hurt brings you out too. While under it you can't use or break blocks, so a stray click on the bed doesn't try to sleep in it. Bosses, the Warden and named or tamed mobs don't vanish.
- More places to hide: besides under a bed, sneak and use with empty hands to hide under a table (two top slabs or upside-down stairs side by side with carpet on top, over a floor), inside a double chest (a single one is too small), or in a closet: a door, or a double door, with a nook behind it two high, shut in on every other side by blocks or by trapdoors lying flush against it, with room to stand; the door must open out of the nook, and shuts behind you. A double chest and a closet two wide hold two players, one in each half. The card says where you hide and shows what you hide in.
- Squinting: hiding, your eyes narrow to a squint, dark lids easing in from above and below as you get in and out as you come out: half closed under a bed, to a slit in a chest, only a little in a closet. The squint sways slowly with your breath, tightens with monsters about, and blinks now and then. It sits under the HUD and stays when the HUD is hidden (F1). The lids are pixel art by default, with an Eyelid style setting for soft, banded or grainy edges; their rim glows red only during the heartbeat minigame.
- Peeking out of a chest: a chest someone hides in has its lid raised a crack, and only their eyes show in the gap, rising into it as the lid lifts, turning a little to where they look, and shivering with monsters about. From inside, you look out through the gap. The head shows the eyes and the face under them, a little back in the shadow under the lid, cut to the slant of the lid so none of it comes up through it, even turned; the chest's latch isn't drawn in your view from inside.
- Hiding cooldown: after coming out of a hiding spot, you must wait before hiding again (10 seconds,
hideCooldownin the server config; 0 for none). Trying sooner shows a card with the seconds left and a bar that runs down. - Simple Voice Chat (optional): speaking while you hide is noise, as loud as your voice. Whispering is safe, talking with a monster near gives you away in a few seconds and shouting at once, and you are pulled out with it coming for you. Others hear you through your hiding spot, muffled and roughened as it lets your voice out: under a bed a little, through a closet door or a chest's crack a lot, through a solid wall hardly at all. Hiding yourself, you hear every voice through your own spot too. The server can turn it off (
voiceGivesAway). - Being heard: making too much noise while hiding with a monster near gives you away: you're pulled out and the nearest comes for you.
- Cover: walls close around a hiding spot hide it better; each takes some time off the hide time, so a bed in a corner shakes monsters off sooner.
- Something already there: now and then (5% by default) a silverfish or cave spider is already in the spot, and chases you out.
- Prowling: while hiding you hear the monsters near you, their footsteps muffled on whatever they walk on and their shuffling when they stand about; lying low, you see each step land as a puff of shadow.
- Sleep quality: each night is scored from 0 to 100: a closed room, the light, monsters prowling, music from a jukebox nearby, restless nights, nightmares and waking early all count. In the morning a card says how well you slept: a word for it, the score as a large percentage counting up as a meter of ten pips lights up to it, and under a divider what mattered most, each row sliding in with its points counting up over a tint as wide as it mattered, then the sleep effect woken with, a sheen crossing it. A wash of the card's color over its head has sparkles that follow the night: lively and rising after a good one, few and sinking after a bad one.
- Jukeboxes: music near the bed counts. Calm discs help you sleep; creepy ones (11, 13, ward, 5, mellohi) and loud, noisy ones (Pigstep, Otherside, Blocks, Creator) lower your sleep quality. Data packs can change which discs are which with the
#whycantisleep:calm,#whycantisleep:creepyand#whycantisleep:loudjukebox song tags. - Night terrors: after restless nights, lying down can bring a night terror, as sleep paralysis: you can't move, your eyes are stuck half open, the world goes dull and warped, and a dense red-black fog rolls through the room. Shadow wells up at the foot of your bed and forms itself into a demon, which comes towards you in glitching, juddering jerks until it is face to face, while shadow arms reach up past the sides of the bed, their hands clawing, then come at you over the bed, snatching at your face, until they hold round your view and only its face shows between them, your heart racing, until a roar jolts you under. It has its own sounds: a swelling drone, whispers, cracking bones, a scream. The worse your night was going to be, the longer and worse it is, and you wake up shaken (nausea and slowness), with a gasp as the world's sounds slowly come back. Operators can give anyone one with
/whycantisleep nightmare [players]: it waits for the next time they lie down (or comes at once if they're already asleep), and they wake shaken. - Well rested: sleeping through the night in a closed room lit all through (doors shut, no dark corners) leaves you well rested, with a little regeneration.
- Sleep effects: waking in the morning can leave you with a sleep effect: one of nine positive dreams after good nights (Sweet Dreams, Early Bird, a Heroic Dream, the legendary Dream of Flight), eight negative ones after bad nights (Groggy, Stiff Back, a Pounding Headache, the legendary Cursed Dream), or five neutral ones after any (Vivid Dream, Dream of the Sea). Each has a rarity, common to legendary, that sets its weight in the draw and the color it is named in; the rarer good ones need better nights, the rarer bad ones worse. The morning card and the sleep status show it with a buff, debuff or neutral icon. 50% chance by default.
- Things by the bed: soothing things placed near the bed (flowers, potted ones too, amethyst, candles, moss, bookshelves) help you sleep; unsettling ones (skulls and heads, cobwebs, sculk, spawners, wither roses) keep you up. Their tooltips say so, with a buff or debuff icon, the points each is worth, and a meter of how many count. The
#whycantisleep:soothingand#whycantisleep:unsettlingitem tags decide which are which. - Sleep status: a small moon button in the corner of the inventory's player preview, its rim the color of your sleep trouble and its moon smiling when you're rested, tired when restless and sad when sleepless, opens a popup with how badly you are sleeping (rested, restless or sleepless, how long you have been awake, refused sleeps in a row, and the sleep debt moon with a meter running to the third day) and how your last night went: its score as a meter of pips, what mattered most, the sleep effect you woke with, and whether you woke shaken or well rested.
- Wake-up reasons: woken before morning, a card says what woke you: something hurt you, or your bed was broken.
- Sleep debt moon: a moon in the top left corner fills up with each day you go without sleep, full at three days when phantoms come.
- Threat ranking: of the monsters that blocked a sleep, the most dangerous (a creeper above all, then the nearest) gets a brighter, throbbing outline and a larger pointer.
- Hearing rings: a blocking monster in view but behind blocks, one you'd hear rather than see, gets a ring where it is, pulsing out like a sound. Arrows point to the ones outside your view.
- Footprints: the blocking monsters leave faint footprints in their colors where they walked, which stay a while after the highlight is gone.
- Clearing the room: deal with every monster that blocked your sleep within 10 seconds, with nothing else coming near, and "The room is safe"; still by the bed, you lie straight down in it.
- Sleep vote: when everyone but one player is in bed, the players in bed can vote from the bedtime panel to skip the night. The player still up is asked politely in chat, "Go ahead" or "Not yet"; with no answer in 30 seconds the night is skipped.
- Sleeping side by side: a bed beside another player who is asleep lets a couple of monsters by.
- Blocker rules: data packs can say which mobs block sleep with the
#whycantisleep:blocks_sleep(any mob) and#whycantisleep:does_not_block_sleepentity type tags. - Sleep effects and modifiers from data packs: data packs can add sleep effects (
data/<namespace>/whycantisleep/sleep_effect/: kind, rarity, weight, the nights' scores they follow, mob effects, name) and sleep quality modifiers (.../sleep_modifier/: label, fixed points or points per monster, soothing or unsettling thing, pillow light or block near the bed, held to a most, and conditions on the room, light, music, monsters, sleep trouble, nightmare, wake reason, dimension, biome, weather and blocks near the bed) with no code. The mod's own are files of the same kind, so a pack can change them, replace them, or turn them off with"disabled": true. - Data generation: Java addons can generate those files with
SleepEffectBuilder,SleepModifierBuilderandSleepDataProvider, a plain data provider for Fabric's and NeoForge's data generation. - Heavy eyes in bed: lying down, your eyelids slowly grow heavy and droop, nodding off now and then. Once everyone is asleep they close by the time the night passes, and in the morning they flutter open. The world's sounds sink as your eyes close, muffled and roughened, and come back as you wake.
- Muffled sounds: while you hide, the sounds outside come muffled, as much as your spot shuts them out: a chest only through the crack under its lid at the front, a closet through its door (an oak door's windows let some through, an iron door hardly any) and the blocks it is built of, a bed or table hardly at all from the sides, with a little distortion, rougher the more is shut out. Your own breath and heart stay clear. A client setting turns it off, along with the muffling in bed.
- Hiding spots from data packs and mods: a data pack can make any block a hiding spot with a file in
data/<namespace>/whycantisleep/hiding_spot/(blocks, posture, offset, view height, squint, floor, hide time, facing, and what the card says), and a mod can register its own withHidingSpots.register. - An API for other mods: how badly a player is sleeping (refused sleeps in a row and days without lying down, as rested, restless or sleepless), events for failed sleeps, lying down, and hiding (starting, which a mod can change, such as the squint, or stop; stopping; the noise a hiding player makes; and the hunters about to vanish, which a mod can keep or add to), and calls to check or start and stop hiding and to read the spot, hide time and noise. Also sleep quality (an event to add factors of your own, and the last night's score), waking (with the reason and the score), skipped nights (and nights skipped by vote), night terrors (which a mod can cancel), and rooms made safe. The mod's sleep rules (tags, shared beds) apply to the blockers it reports. Sleep quality modifiers can be registered in code (
SleepModifiers, scored from aSleepContext), and sleep effects too (SleepEffects, with an action of their own), with an event to change or cancel the effect drawn. - Heartbeat minigame: hide with monsters chasing you and you must keep your heart slow. A warning ("Watch out!" or "Be careful!") slams in under the crosshair while the rest of the HUD fades away, then a band of pixel-art smoke billows open across the whole screen under it, faint smoke drifting off its edges: heartbeats cross a pulse line, and a left click as each passes the calm window (a rounded frame that breathes while a beat is in it) steadies it, the game's mouse swelling and showing its button pressed. Pixel-art veins creep in from the edges of the screen over a dark red vignette, further and brighter with each miss and falling back as you catch beats, throbbing with each heartbeat. The warning stays over the band as a live line on how you are doing (steady, doing great, too early, too late, missed, last chance), popping on good news and shaking on bad. Your moves make no noise while it runs; each miss breaks one of three hearts with a pop. Miss the last beat before the time is up and it goes into overtime ("One more beat!"): catch one more to end it, with at most two beats of overtime, and at the third you gasp, and whatever chased you in comes for you at once. Its own sounds: a deep sting as the warning lands, a low heartbeat, a swell that rises to each beat's window, a bass and a bell for each beat caught (climbing a scale through a streak), a crack for a broken heart and a gasp, all replaceable with your own files.
- Monsters search: what chased you into a hiding spot comes to it, stops in front, and looks about, then either finds you and drags you out or walks off. The chance it finds you is a server setting (25% on normal, half on easy, half as much again on hard, never on peaceful), and the noise you make adds to it. While you're playing the heartbeat minigame it can't find you by chance: only failing the minigame gives you away.
- Found by players: another player opening the chest or closet door you hide behind finds you, and you come out.
- Coming out: leaving a chest or closet puts you right against its front, in front of the half or door you were behind.
- A chest's view: peering out of a chest, you can only turn so far.
- Everyone has to hide: the monsters about your spot vanish when the hide time is up only if every other player near is hiding too; else they lose you and stay. A server setting turns the vanishing off.
- The hiding card's timer shows only with monsters about, counting down the time left to hold out.
- Guide book: the Insomniac's Handbook, a book in Folios, given to every player when they first join and crafted from a book and any bed, with everything about sleeping, hiding and the heartbeat, sleep quality, dreams and night terrors. Its lists of sleep effects, modifiers, bedside things and bedtime music are live, so what a data pack adds shows up in it; creatures it names pop up under the pointer, and so do the closets it shows how to build. Two quests tick themselves off as you play, each with a small reward: a Bedtime Checklist (a flower pot and a soothing plant) and Hide and Seek (a door, once something hunting you gives up).
- Client and server configs, with client options locked while the server turns their feature off. Hiding under beds or tables and in chests or closets, the heartbeat minigame, monsters searching, monsters vanishing and the sleep status button can each be turned off.
🐛 Bug Fixes¶
- The game no longer crashes while starting on NeoForge: the sleep rules (the sleep tags, a shared bed's tolerance) now find the monster check where NeoForge has moved it.
- Coming into a hiding spot on the move no longer makes the view flicker: you stop where you hide.
- Holding the attack button no longer breaks your hiding spot (or anything else) from inside it.
- A silverfish or cave spider already in a hiding spot comes out at its mouth and after you, rather than staying stuck inside the bed or chest.
- A hiding spot with a monster in it can't be hidden in.
- Breaking a hiding spot brings whoever hides there out at once.
🛠️ Changes¶
- Harsh night terrors (
harshTerrorsin the server config, on by default): the longer you stay awake, the worse a night terror gets, each day past the first making it more intense. Waking from one leaves you worse off the more intense it was: longer nausea and slowness, then weakness, mining fatigue and a moment of darkness; after three days without sleep, it hurts too (never below half a heart). - The sleep status button in the inventory moves out of the way of other mods' buttons in that corner.
- The sleep debt moon pops larger when it appears and as each day passes, so it is noticed. It stays at the top left by default, and its place can be set in the client config (
debtMoonPosition: a corner or the top center, anddebtMoonOffsetX/debtMoonOffsetYto nudge it). It keeps out of the way of the rest of the HUD, whichever mod drew it (a minimap, Jade's tooltip, the boss bars), gliding clear of them. - The message cards and the bedtime panel are pixel art now, with a pale lit rim, and the sleep quality card has smoky edges; each is tinted a touch with its message's color.
- Needs Folios 3.0.0 or later for the guide book, and CoolCatLib 8.0.0.
- The Lurker, the Dark Between, boss combat, and mood and lucidity moved to a mod of their own, Behind Closed Eyes, along with the whispers and the "monster under the bed" scare. Why Can't I Sleep? keeps the sleep features and no longer needs anything registered.