Fast Forward

Introduction

Nobody can stop the pace of time. In this tutorial, though, you will make time go faster than normal… while you’re walking!

Fast forwarding!

I see you walking!

Add an event to run code when the player walks.

player.onTravelled(WALK, function () {
})

Move ahead in time

A Minecraft day lasts 24000 ticks for 20 minutes of play. Let’s speed it up by skipping 100 ticks. Use code to add 100 ticks to the time when the player walks.

player.onTravelled(WALK, function () {
    gameplay.timeAdd(100)
})

Try it!

Go to Minecraft, walk around and look at the sky. You should see the sun moving fast…

Time not changing? Make sure the “always day” option isn’t turned on.

Add time when flying

Put in code to add 1000 ticks to time when the player is flying.

player.onTravelled(FLY, function () {
    gameplay.timeAdd(1000)
})

Flying through time!

Go in Minecraft and try to fly around. Welcome to a non-relative time machine!