Minecraft Data Packs / Quality of Life

Server Sleeps On Join

  • check_circle Functions
  • 571 views, 570 today
  • 47 downloads, 47 today
  • 6
  • 1
  • 6
Chameleoon avatar Chameleoon
Level 4 : Apprentice 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
CompatibilityMinecraft 1.17
toMinecraft 1.18 Snapshot
Tags

Create an account or sign in to comment.

2
09/15/2021 4:40 pmhistory
Level 30 : Artisan Crafter
The8BitMonkey
The8BitMonkey avatar
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)
1
09/15/2021 5:39 pm
Level 4 : Apprentice Modder
Chameleoon
Chameleoon avatar
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
2
09/15/2021 6:26 pm
Level 30 : Artisan Crafter
The8BitMonkey
The8BitMonkey avatar
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
09/15/2021 6:35 pm
Level 4 : Apprentice Modder
Chameleoon
Chameleoon avatar
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
09/15/2021 3:47 am
Level 4 : Apprentice Mage
Raandom
Raandom avatar
OOOoooo clever!
2
09/15/2021 6:41 pm
Level 4 : Apprentice Modder
Chameleoon
Chameleoon avatar
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!
Planet Minecraft

Website

© 2010 - 2021
www.planetminecraft.com

Welcome