Description
Join my Discord if you run into issues or have ideas https://discord.gg/mKgxyk6qvb
Vanilla Hytale ends the night only when every player in the world is in bed. One player mining in a cave or sitting in Creative keeps the night going for everyone else. Lullaby ends the night once 50% of the players sleep, or any share or fixed number you set.
What sleepers see
By default Lullaby swaps the two vanilla systems that end a night for copies that know the threshold. Sleepers get the real sleep clock, the grey fade and the success sound. Players who stay up see the morning arrive. If a game update changes those systems, Lullaby notices on start, puts vanilla back and fast forwards the clock instead.
When the number of sleepers changes the world gets one line, Lullaby 2 of 5 players sleeping, 1 more needed, and players still awake get it as a toast. After a skip storms are cleared with each area's own forecast, so a desert does not get forest rain. A cooldown of 60 seconds stops nights from chaining.
Who counts
A player in bed always counts. Spectators never do. Creative players and anyone idle for five minutes are left out, and any player can opt out with /lullaby ignore. A minimum number of sleepers stops one player skipping the night alone on a big server.
Each world can have its own rule. Turn Lullaby off in the lobby, ask for everyone in a hardcore world, or let two players skip in survival.
There is also an experimental dynamic mode, off until you set AllowDynamic, where every sleeper makes the night run faster, up to 20 times as fast.
Commands
| Command | What it does |
|---|---|
/lullaby |
Who is in bed and how many more are needed. Alias /sleepers |
/lullaby ignore |
Stop or start counting yourself |
/lullaby admin skip |
End the night now |
/lullaby admin set percent 50 |
Change the rule, also set count 2 and set dynamic |
/lullaby admin world lobby enabled false |
Turn Lullaby off in one world |
/lullaby admin reload |
Re-read Lullaby.json |
Admin commands need two generated nodes,
ryvrook.lullaby.command.lullaby.adminand the sub command's own, such asryvrook.lullaby.command.lullaby.admin.skip. The console has all of them.
Every setting is in mods/Ryvrook_Lullaby/Lullaby.json and listed in the README on GitHub.
With my other mods
All optional, and Lullaby reads none of them. SocialBridge posts to Discord when a world skips the night, once you turn on lullaby.notices, and its /server command shows who is in bed in each world. RestAPI serves the mode, the sleepers and the nights skipped under /api/lullaby. Both find Lullaby on their own and each has a setting to switch the link off. TrackerAPI counts sleeps from the bed state with or without Lullaby. Feats, Chronicle Stats, Atlas, Coinage and Dominion Factions run next to it without a link. The Coinage, Dominion Factions, SocialBridge and RestAPI pages are not live yet.
For plugin authors there is a small read API with two events, a skipped night and a change in the number of sleepers. The reference is docs/API.md on GitHub.
Limits
Needs server 0.7.0 or newer and Java 25. Another mod that replaces the vanilla slumber systems clashes with the default mode, so set Mode to manual next to it. The vanilla "is sleeping" chat notice and the on screen counter still count everyone, because vanilla and the client draw them. Lullaby's own line has the real numbers.
Links
- More mods by ryvrook https://www.curseforge.com/members/ryvrook/projects
- TrackerAPI, Feats, Chronicle Stats, Atlas
- Coinage, Dominion Factions, SocialBridge and RestAPI
- Source and issues https://github.com/ryvrook/lullaby
- Discord https://discord.gg/mKgxyk6qvb
