Minecraft Data Packs / Quality of Life

Server Sleeps On Join

  • check_circle Functions
  • 2,696 views, 10 today
  • 129 downloads, 0 today
  • 8
  • 5
  • 7
Chameleoon's Avatar Chameleoon
Level 12 : Journeyman 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
Tags

Create an account or sign in to comment.

1
09/21/2021 11:33 pm
Level 1 : New Miner
Arrows_Of_Doom2
Arrows_Of_Doom2's Avatar
Great idea
2
09/15/2021 4:40 pmhistory
Level 56 : Grandmaster Procrastinator
The8BitMonkey
The8BitMonkey's 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 12 : Journeyman Modder
Chameleoon
Chameleoon's 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 56 : Grandmaster Procrastinator
The8BitMonkey
The8BitMonkey's 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 12 : Journeyman Modder
Chameleoon
Chameleoon's 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 16 : Journeyman Blueberry
Raandom
Raandom's Avatar
OOOoooo clever!
2
09/15/2021 6:41 pm
Level 12 : Journeyman Modder
Chameleoon
Chameleoon's 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 - 2024
www.planetminecraft.com

Welcome