You are currently on the unstable branch. Click here to go to safety.
Download
Choose Minecraft Version
1.20.41.20.4v1.0.0
Close

OhSoEepy

OhSoEepy is a Minecraft datapack library with multiple sleeping related features.
It's MIT-licensed, so you can use it in your projects.

Below is a guide on all the features!


time_player_last_slept - score

A score that stores how many ticks the player last slept.


can_player_sleep - function

You can use /execute if function ohsoeepy:can_player_sleep to check if the player can sleep. It checks for these conditions:

  • There isn't a monster nearby (8 blocks horizontal, 5 blocks vertical)*
  • The player isn't poisoned, on fire or starving
Note: this doesn't check if there is a bed nearby.
* A select list of mobs, but some mobs don't have special cases (All endermen count, and killer bunnies aren't included)

player_woke_up - function tag

List of functions that get run when the player wakes up.
Located at ohsoeepy/tags/functions/player_woke_up.json

Support

https://discord.gg/hg7hgHPfWF

Smithed

Copyright © 2024 Smithed
Not an official Minecraft product. Not approved by or associated with Mojang Studios