xiaozhi better sleep
作者:xiaozhidgg
A server-side Minecraft mod for NeoForge that lets you customize the "sleep to skip the night" mechanic on multiplayer servers.
介绍
中文介绍正在准备中,下面暂时显示原文。
XiaoZhi ServerSleep (xiaozhiserversleep)
A server-side Minecraft mod for NeoForge that lets you customize the “sleep to skip the night” mechanic on multiplayer servers.
What it does
- Sleep ratio — the percentage of eligible players that must be asleep to skip the night. Default 50%; allowed values are multiples of 10 (10–100).
- Two skip modes:
- instant — jump straight to morning (vanilla-like).
- accelerate — smoothly fast-forward time to morning (a visible timelapse) instead of teleporting; the speed is adjustable.
- Eligibility counting — only counts overworld, non-spectator players, and only those who have genuinely fallen asleep (in bed long enough, matching vanilla’s “closed eyes” delay).
- Server-only — no client-side content; clients without it can still join.
- Chinese command feedback, with tab-completion for the mode values.
Commands (requires OP level 3)
| Command | Description |
|---|---|
/sleep or /sleep help |
Show help |
/sleep ratio [10–100 multiple] |
View / set sleep ratio |
/sleep mode [instant|accelerate] |
View / set skip mode |
/sleep speed [multiplier] |
View / set acceleration speed |
/sleep status |
Show current settings |
Configuration
Server config file (auto-generated in the config/ folder):
[sleep]
sleepPercentage = 50 # sleep ratio (multiple of 10)
skipMode = "INSTANT" # INSTANT or ACCELERATE
accelerateSpeed = 5 # time ticks advanced per server tick (lower = smoother)
Command changes are written back to this file and persist across restarts.
Technical notes
- Uses a Mixin into
ServerLevelto neutralize vanilla’s automatic skip-and-wake logic, then runs its own per-tick handler (ServerSleepManager) applying the configurable ratio and selected mode. - Runs only on the overworld.
- The mod’s version and jar name are single-sourced from
gradle.properties(mod_id/mod_version/minecraft_version), producing jars like:<modid>-<modVersion>-neoforge-<gameVersion>.jar - Built with ModDevGradle; includes a mirror init-script so it builds even where
maven.neoforged.netis blocked (e.g., mainland China).
常见问题
xiaozhi better sleep 支持哪些 Minecraft 版本?
xiaozhi better sleep 支持 Minecraft Java 版 1.21.1,可用的加载器:Fabric / Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。
xiaozhi better sleep 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
评论
登录后评论和评分