Data Packs Quality of Life

Server Sleeps On Join

  • 2.8k views 0 today
  • save_alt 133 downloads
Compatibility
Minecraft 1.17
to version
Minecraft 1.18
Changes include
  • Functions
  • 8
  • 5
  • 7
Chameleoon
Lvl 12Journeyman Modder
0
Checks the current time when player joins if no other player is online adds time (/time add) based on current time, resulting in a time value between 0 and 1001 (morning), preventing joining your server at night.

Thank you The8BitMonkey for suggesting the use of /time add instead of set.


Motivation: I play on a private server with just a couple of friends, and I always hate it when we join to find it's night time.

Image: Complementary Shaders

More like this

  Have something to say?

Arrows_Of_Doom2
09/21/2021 11:33 pm
Level 1 : New Miner
Great idea
1
The8BitMonkey
09/15/2021 4:40 pm
Level 58 : Grandmaster Procrastinator
history
Like the idea however there might be a small problem for some users (and servers)

When you use the command /set time 0 it also resets the Day count (in F3) and the local difficulty.

For some people this will mean that if they rely on local difficulty for mob farms then this will reduce spawn rates.

It'll also mean that people who keep track of how long a world has been activate for via the f3 screen they'll lose that info

Nevertheless a great idea for a pack, might just be better to do /time add X instead of /time set to fix this issue

You could store the current time in a scoreboard and then if the score is at certain values add X amount to make it to 0 (or morning)
2
Chameleoon
09/15/2021 5:39 pm
Level 12 : Journeyman Modder
Thanks for the feedback, it's the first time I try something like this, I was expecting to mess somewhere. I'll fix it ASAP
1
The8BitMonkey
09/15/2021 6:26 pm
Level 58 : Grandmaster Procrastinator
It's all good, happy to help :)

Can't count the amount of times one of my packs broke something I didn't think would be an issue......until it was lol
2
Chameleoon
09/15/2021 6:35 pm
Level 12 : Journeyman Modder
haha, that's how we learn!
I've updated the pack, sadly the time command doesn't take a variable so I had to put a couple of conditions based on current time, in the end you'll get a final time between 0 and 1001, but that's not a problem imo

Thanks again!
2
Raandom
09/15/2021 3:47 am
Level 17 : Journeyman Blueberry
OOOoooo clever!
2
Chameleoon
09/15/2021 6:41 pm
Level 12 : Journeyman Modder
Thank you! I've updated it so it no longer resets the days counter, it's now adding time like a player would when sleeping!
2

Welcome