Data Packs Server Utility

Sleep Indicator

  • Functions
  • 4,607 views • 1 today
  • 974 downloads • 0 today
  • 21
  • 14
  • 13
ImJunny
Level 28 : Expert System
7
Sleep Indicator by ImJunny
- Displays amount of people required in the Overworld to make it daytime!
- Visible if multiple players are in Overworld
- Hidden for players in the Nether/End
- Simple commands!

If there are any problems, let me know. I will try to fix it as soon as possible!
CompatibilityMinecraft 1.13
toMinecraft 1.17
Tags

  Have something to say?

Shamwig
06/19/2021 10:58 am
Level 40 : Master Pixel Puncher
Hi, quick question. This datapack works in 1.17? more specific with the /gamerule playersSleepingPercentage?
1
ImJunny
06/27/2021 8:14 pm
Level 28 : Expert System
I have not tested it for 1.17 but it should work.
2
Maztm
05/22/2021 11:30 am
Level 1 : New Miner
Is there a way for this count to ignore people in spectator or vanish mode?
1
ImJunny
05/25/2021 2:32 pm
Level 28 : Expert System
Perhaps you can manually change the datapack commands in the "main" file found in data/si/functions.
To count all players in SURVIVAL only (by making these commands more specific):

Change line 1 to
bossbar set sleepbar players @a[nbt={Dimension:"minecraft:overworld"},gamemode=survival]


Change line 4 to
execute store result score people sleeping if entity @a[nbt={Dimension:"minecraft:overworld"},gamemode=survival]

You get the idea. Change the specifications if needed. Let me know if that works, thanks!
2
Maztm
06/27/2021 6:05 pm
Level 1 : New Miner
Sorry for super-late response (had a long-running event to see who could not sleep for the longest) but this works.
1
nata_gush
05/11/2021 2:41 pm
Level 1 : New Miner
Hello. I tried it in 1.16.5 and it doesn't work. Is there a command I have to use before trying it? I restarted the server too, but it doesn't work. All players were in the same world.
1
ImJunny
05/11/2021 4:30 pm
Level 28 : Expert System
That's odd. I tested this on 1.16.5 too and everything seemed to work. Did you accidentally put the zip file itself and not the folder in that zip file into your datapacks folder? What I would do is check this and if you are op, use the command /reload. If there is a "Reloaded Sleep Indicator by ImJunny" message, then everything should be working.
2
nata_gush
05/28/2022 5:15 pm
Level 1 : New Miner
I fixed it (forgot to unzip) and it works perfectly on my SMP. Thanks alot!
1
anonpmc3307826
06/12/2021 11:20 am
Level 6 : Apprentice Miner
[deleted]
1
ImJunny
06/21/2021 7:27 pm
Level 28 : Expert System
Sorry for being inactive. If you're asking whether it works for multiple players, then yes. For example, if there are 53 players in the overworld, then the sleep indicator will display ex: 5/53 Players Sleeping. It'll work for as many people there are in the overworld (since people in the nether and end don't need to sleep in the overworld for the day to pass).
1

Welcome