- check_circle Functions
- 34,236 views, 8 today
- 4,779 downloads, 1 today
340
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
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.
Compatibility | Minecraft 1.17 |
to | Minecraft 1.19 |
Tags |
2 Update Logs
Version 3 : by Deprecated 12/22/2022 1:05:22 amDec 22nd, 2022
Changes
- 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
LOAD MORE LOGS
4197216
119
Create an account or sign in to comment.
The only caveat is that players could keep entering a bed and exiting just before they fall asleep to speed the night up.
#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
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
- 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.
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.
if it's possible... how can I do that?