Somnus API
This project has been discontinued starting from Fabric API version 0.39.0+ for Minecraft 1.16.5 and 1.17.1. Instead, it is recommended to use EntitySleepEvents, which were added in the specified Fabric API version.
Somnus is a lightweight library that expands sleep capabilities in Minecraft, offering mod developers a simple and compatible way to implement their own sleep mechanics on the Fabric platform.
Key Features
- Setting the time of day in the world when players wake up
- Blocking or intercepting sleep attempts
- Determining valid time periods for sleeping
- Intercepting the moment when players wake up
- Configuring vertical offset for sleeping characters
Project Integration
For detailed information on connecting the library to your project, refer to the README file on GitHub.