promotional bannermobile promotional banner

xiaozhi better sleep

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 ServerLevel to 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.net is blocked (e.g., mainland China).

The xiaozhi better sleep Team

profile avatar
  • 2
    Projects
  • 344
    Downloads

我是人

More from xiaozhidgg

  • xiaozhitpa project image

    xiaozhitpa

    A server-side TPA / home / back utility mod for Forge, NeoForge and Fabric — request teleports, set named homes per dimension, and return to your last location.

    • 314
    • August 27, 2026
  • xiaozhitpa project image

    xiaozhitpa

    A server-side TPA / home / back utility mod for Forge, NeoForge and Fabric — request teleports, set named homes per dimension, and return to your last location.

    • 314
    • August 27, 2026