• check_circle Functions
  • 31,072 views, 16 today
  • 4,434 downloads, 1 today
  • 79
  • 73
  • 21
Deprecated's Avatar Deprecated
Level 76 : Legendary Modder
This data pack allows you to extend the length of your Minecraft day (and/or night).

By default, daytime is extended by 12000 ticks (10 minutes; twice the normal time), and nighttime is unchanged. If you'd like to change that, you can set the amount of time to extend the day (in ticks) by using scoreboard players set dayExtend longday <your number here> and scoreboard players set nightExtend longday <your number here> for the night.

Known Issues
  • Extending night time has a chance of preventing the night from passing correctly when sleeping in a bed.
CompatibilityMinecraft 1.17
toMinecraft 1.19

2 Update Logs

Version 3 : by Deprecated 12/22/2022 1:05:22 amDec 22nd, 2022

  • Config defaults now only load on version change.
  • Players can set the amount their own day and night extension times (in ticks) by setting scoreboards longday dayExtend and longday nightExtend and those values will be respected.
  • Updated data pack version to 1.19.3

Create an account or sign in to comment.

06/22/2023 6:07 am
Level 13 : Journeyman Miner
Simmyuwu's Avatar
I made a fix for this to work at night and allow sleeping on my server and thought I'd share.
The only caveat is that players could keep entering a bed and exiting just before they fall asleep to speed the night up.
#fix sleeping
#if awake, set sleeping 0
scoreboard players set @a[scores={ldawake=1..}] ldsleeping 0

#reset storage
scoreboard players set $sleeper ldstorage 0

#IF someone is sleeping, their score is copied to storage
execute store result score $sleeper ldstorage run scoreboard players get @a[scores={ldsleeping=1},limit=1] ldsleeping

#OR not both run
#start time if someone in bed
execute if score $sleeper ldstorage matches 1 run gamerule doDaylightCycle true

#otherwise, business as usual
execute if score $sleeper ldstorage matches 0 run function long_day:tick

put this in a new mcfunction, and set tick.json to run that function instead of long_day:tick

also, dont forget to add this to your load.mcfunction
load.mcfunction additions
#fix sleeping
scoreboard objectives add ldsleeping minecraft.custom:minecraft.sleep_in_bed
scoreboard objectives add ldawake minecraft.custom:minecraft.time_since_rest
scoreboard objectives add ldstorage dummy
06/16/2023 6:16 am
Level 4 : Apprentice Explorer
KaruMC's Avatar
Is there a way to make it work like this for example:

- when the day reaches tick 8000 daylight cycle stops for 5 minutes and then resumes after letting it progress to tick 10000 where it will stop daylight cycle again for 5 minutes, and then progress again to tick 18000 and stop again for 5 minutes to simulate longer time for morning - noon and night time. Personally the stuttering sky because of the tick update is hard to ignore.
06/11/2023 12:40 am
Level 1 : New Explorer
Worksr's Avatar
I wonder if this works with 1.20? Seems like an excellent datapack I'd love to use it in a Realm
06/06/2021 12:00 am
Level 1 : New Miner
AndresJs's Avatar
There are bugs with the shaders, they move little by little, 1 tick per second and everything looks like in slow motion
02/26/2021 4:31 pm
Level 25 : Expert Miner
Tachytaenius's Avatar
Yeah, long nights aren't always slept through. Here's my manual solution:
Run time query day

Then run
time set xd
Where x is the result from the previous command plus one. This preserves moon phases et cetera.
Of course, you can do it with ticks etc but the maths is simpler this way.
I don't know how you could make this automated for the datapack to do.
02/26/2021 7:44 pm
Level 76 : Legendary Modder
Deprecated's Avatar
No easy way to automate that without stepping forward in time by some set amount and then checking if it's daytime yet, then doing the same, or doing some math and then a massive block of "if this value, then step forward this amount" statements, both of which will be inefficient.
05/15/2020 4:50 pm
Level 1 : New Miner
Uneaqualty65's Avatar
Is there such thing as long night?
05/15/2020 4:53 pm
Level 76 : Legendary Modder
Deprecated's Avatar
It's possible to increase the night time with this data pack by changing the config file (details in the description), but you risk not being able to pass the night when you sleep, which is a weird interaction between how I extend time and how Minecraft sleeping works.
05/15/2020 5:01 pm
Level 1 : New Miner
Uneaqualty65's Avatar
The not being able to sleep part is fine, because i would like to make the night longer for my really hard hardcore world i i have a rule to not sleep. Thanks!
03/18/2020 2:25 pm
Level 1 : New Miner
RalphLord's Avatar
Can I make the day shorter?

if it's possible... how can I do that?
Planet Minecraft


© 2010 - 2024