Minecraft – way to slow down the Day/Night cycle

minecraft-java-edition

While there is a command that you can use to set the time, the problem with it is that one would have to remember to use it when it's getting late to set it back.

I'm looking for a way to slow down the day/night cycle to add a little more danger to the game when I get caught out at night without a shelter and a bed, and also so that when I'm building I have more daylight to not have to worry about Creepers blowing crap up and more nighttime to see if I have enough lights around.

Best Answer

Using command blocks and some redstone, this can be achieved.

First of all, you need to set /gamerule doDaylightCycle to false, to stop the natural daylight cycle. From here, we are going to use command blocks (/give <username> command_block), some redstone, and the command /time add <number> to control the daylight cycle.

Here is a very simple, and pretty easy to tune setup:

A hopper clock increments the time by 1 (out of 24,000) every given interval

The command on the command block is /time add <number>, tuned however you would like (1 item in the clock with an increment of 5 results in a 28 minute day). There is no hidden redstone, and both pistons are sticky. The hoppers feed into each other, and you choose the number of items put in (more items means slower day/night cycle).

The formula for calculating the length of daytime is 140 * (items / number) minutes of daytime (double that for the length of a whole day).

You're also going to want to use the command /gamerule commandBlockOutput false if you don't want periodic chat updates saying Added 1 to time.

You're also going to want to put this in your spawn chunk if you intend for it to work no matter where you are in the world (determine your spawn chunk by breaking your bed and killing yourself).