Can you increase the amount of time in a day? [duplicate]

Solution 1:

For shorter nights you can increase the rate at which time increases using the /time add command. The simplest method would be to use an inverted daylight sensor.

Example using 1.9's Repeating Command Block, set to "Needs Redstone", with an inverted daylight sensor on top of it:

Inverted daylight sensor atop repeating command block

The command is very simply:

/time add 1

This will double the speed that time passes during night. Setting the value higher will increase the speed further.

Solution 2:

This can be done with a command block contraption that basically combines telling time with slowing down/speeding up time.

Seeing that 1.9 will be released just next week, I'll use 1.9's new command blocks for this.

First, set the gamerules commandBlockOutput and doDaylightCycle to false to turn off command block spam and the natural daylight cycle. We'll need an objective to store a timer.

/scoreboard objectives add time dummy

Furthermore we'll use several fake players, whose names all start with a #. These are not valid player names and don't ever show up on the scoreboard.

Now, we need to start by figuring out what time it is and store it somewhere we can access it. Set up a repeat command block and put:

/time query daytime

Stand on top of the this command block and run

/stats block ~ ~-1 ~ set QueryResult #DAYTIME time

to automatically store the result of the time query on #DAYTIME.

We can now use /scoreboard players test #DAYTIME time <min> [max] to check for specific time ranges, and use conditional command blocks to trigger different "clocks".

Make a new chain of command blocks and set all of the chain command blocks to "conditional":

/scoreboard players test #DAYTIME time <min> <max>
/scoreboard players add #TIMER time 1
/scoreboard players test #TIMER time <X>
/time add <Y>
/scoreboard players set #TIMER time 0

Replace <min>, <max>, <X> and <Y> with appropriate numbers. When the daytime is between <min> and <max> (inclusive), time will advance at a rate of <Y>/<X> the normal speed. For example, to slow down the day to half-speed, use 0, 12000, 2, 1, respectively.

Note that higher values of <X> will cause time to "stutter", because it's only advanced every <X> ticks. Also, in the case of <X> = 1, you can leave out the 2nd, 3rd and 5th commands entirely.