
Somnus API
A lightweight library for integrated sleep mechanics on Fabric.
About this Mod
This project is discontinued as of Fabric API 0.39.0+ for 1.16.5 and 1.17.1. Please use the EntitySleepEvents introduced in that Fabric API version instead.
Somnus is a lightweight library that adds a few events for sleeping in Minecraft to allow mod
developers easy and compatible ways of implementing their sleep mechanics on Fabric.
Features
- Determining the time of day for the world when players wake up
- Preventing or hooking into sleep attempts
- Determining valid times of day for sleeping
- Hooking into when players wake up
- Changing vertical offsets for sleeping players
Adding to Your Project:
Please refer to the GitHub README file.
Affiliates
Available Versions
How to Install Somnus API on Your Server
Order Server
Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).
Set fabric Loader
In the panel under "Egg", select the fabric loader and matching Minecraft version (1.17.1).
Install Mod
Open the mod browser in the dashboard and search for "Somnus API". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.
Compatibility
Mod Loaders
Minecraft Versions
1.17.1, 1.16.5
Server-side
~ OptionalRecommended RAM
4 GB(min. 3 GB)Frequently Asked Questions
Somnus API server crashes on startup – what to do?
Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.17.1). You can switch loaders with one click in the panel.
Is Somnus API compatible with fabric?
Somnus API officially supports fabric for Minecraft 1.17.1, 1.16.5. The Mado dashboard automatically detects incompatible loader combinations.
Server lagging with Somnus API – how to optimize performance?
Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if Somnus API consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.
Similar Mods
Rent Modded Server
Install Somnus API with just one click on your server.