Mods
Resource Packs
Data Packs
Modpacks
Shaders
Plugins
Mods Resource Packs Data Packs Plugins Shaders Modpacks
Get Modrinth App Upgrade to Modrinth+
Sign in
ModsPluginsData PacksShadersResource PacksModpacks
Sign in
Settings
Somnus API

Somnus API

A lightweight library for integrated sleep mechanics on Fabric.

460
2
Game Mechanics
Library
Somnus API has been archived. Somnus API will not receive any further updates unless the author decides to unarchive the project.

Compatibility

Minecraft: Java Edition

1.17.1
1.16.5

Platforms

Fabric

Supported environments

Client-side
Server-side
Client and server (optional)

90% of ad revenue goes to creators

Support creators and Modrinth ad-free with Modrinth+

Links

Report issues View source Join Discord server
Donate on Ko-fi

Creators

TheIllusiveC4
TheIllusiveC4 Owner

Details

Licensed LGPL-3.0-or-later
Published 2 years ago
Updated 2 years ago
DescriptionChangelogVersions

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

BisectHosting

Modrinth is open source.

main@4b75cb8

© Rinth, Inc.

Company

TermsPrivacyRulesCareers

Resources

SupportBlogDocsStatus

Interact

Discord X (Twitter) Mastodon Crowdin
Get Modrinth App Settings
NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.