Game Tick
A game tick is one step of the world simulation, run 20 times a second.
The loop
A server measures how much real time has passed since its last pass and banks it, then runs one tick for every 50 milliseconds banked. A tick is never partly run.
Singleplayer holds the same rate with a timer that turns elapsed real time into whole ticks, and runs at most 10 of them between two frames.
A frame is not a tick. Each frame is drawn part of the way from the last tick to the next, with positions and angles interpolated across the gap.
Most open screens stop the world in singleplayer. Ticks keep running, and input and the interface are still handled, but every part of a tick that touches the world is skipped, particles included. The chest, furnace, crafting table and inventory screens are the exception, along with the death screen.
What one tick does
The world tick runs in this order:
| Order | Step |
|---|---|
| 1 | Rain and thunder timers advance |
| 2 | The night is skipped if every player is asleep |
| 3 | Mobs spawn |
| 4 | Up to 100 queued chunks are saved and unloaded |
| 5 | The sky light reduction for the time of day is recalculated |
| 6 | The world time advances by one, and every 40th tick starts a save |
| 7 | Scheduled ticks that have come due run |
| 8 | Each active chunk gets its weather rolls and 80 random ticks |
Entities and block entities are updated in a pass of their own. Singleplayer runs that pass before the world tick, a server after it.
Entities
Every entity in the world list is updated once per tick, in list order. The update stores the previous position for interpolation, applies gravity and motion, resolves collisions, and then runs whatever the entity does for itself.
An entity is skipped unless every chunk within 32 blocks of it is loaded. An entity carrying a passenger updates the passenger immediately after itself, so a rider never lags its mount by a tick.
Entities that die during the pass are dropped from the list before the next one.
Most of what a tick means for an entity is a counter moving by one:
| Counter | Effect |
|---|---|
| Burning | 1 damage every 20 ticks, counting down to zero |
| Air | 300 at the surface, falling by 1 each tick underwater; 2 damage every 20 ticks once it is gone |
| Death | the body drops its items at once and lies for 20 ticks before it is removed |
| Item age | a dropped item disappears after 6000 ticks — 5 minutes |
| Fuse | primed TNT explodes 80 ticks after it is lit |
Block entities
Every valid block entity in the loaded list is offered a tick, and three of the eight kinds use it. The furnace burns fuel and advances its smelt, the monster spawner counts down its delay, and a moving piston advances its animation. The chest, sign, dispenser, note block and jukebox hold state but keep no timer.
Block updates
Changing a block sends a block update to each of its six neighbours, within the same tick, in the order −x, +x, −y, +y, −z, +z. A block update asks the neighbour to check itself again, and carries the type of block that sent it; see Redstone Power#Block updates.
Nothing is queued. When a block update makes a block change, that block sends its own block updates straight away. The block that sent the first one waits, and sends its next block update only when the changed block has finished. Block updates therefore run depth first, and a whole redstone line settles before the tick that started it is over.
Dust, pistons and doors act on a block update at once. Redstone torches, repeaters, dispensers, and falling sand and gravel schedule a tick instead, which is where their delays come from.
Scheduled ticks
A block asks the world to call it back a fixed number of ticks later. The request records the position and the block id.
One set holds every pending tick in the world. There is no queue per block type and none per chunk. Entries are ordered by due time first and by a serial number second, so ticks that come due together run in the order they were asked for.
At most 1000 scheduled ticks run in one tick. Anything still due waits for the next one.
Generating terrain queues a tick for each block in the underground pockets of gravel it places, a few hundred to a chunk. A player reaching new terrain can hold up every scheduled tick in the dimension for several seconds; see Redstone Power.
Two conditions are checked before a due tick runs. Every chunk within 8 blocks must be loaded, and the block at the position must still be the one that asked. A block broken while its tick was pending gets nothing.
One position holds one pending tick per block id, so asking twice before the first comes due achieves nothing.
| Block | Delay |
|---|---|
| 2 ticks | |
| 2, 4, 6 or 8 ticks, by setting | |
| 3 ticks | |
| 4 ticks | |
| 5 ticks | |
| 20 ticks | |
| 30 ticks | |
| 40 ticks |
Random ticks
A random tick picks one block out of an active chunk and calls the same
updateTick a scheduled tick would. Eighty are drawn per chunk per tick, from
the whole 16×16×128 column, so a given block is picked about once every 410
ticks — around 20 seconds.
Positions come from a counter the world keeps rather than from its random number generator, and nothing stops the same block being drawn twice in a tick.
A chunk more than 9 chunks from every player draws none, so nothing grows there however long the world runs.
Only blocks flagged for it do anything when drawn:
| Block | On a random tick |
|---|---|
| spreads to nearby |
|
| drop if the spot has become illegal | |
| the same check, then one growth stage in light 9 or better | |
| the same check, then one stage, then a tree | |
| spreads to a nearby space, 1 time in 100 | |
| advance one of 16 stages, and grow a block on the sixteenth, up to three tall | |
| wets to full near water or in rain, dries one stage otherwise, and turns to dirt when dry unless crops stand on it — 1 time in 5 | |
| if flagged, decay unless a chain of up to 4 leaves, joined face to face, reaches a |
|
| spreads to what it can reach, and burns out | |
| flowing forms recompute where they flow | |
| melts above block light 8 | |
| a layer melts above block light 11; a snow block never melts | |
| stops glowing | |
| rechecks whether it should be lit | |
| reattaches itself, or drops, if it has no facing set | |
| release | |
| vanishes | |
| nothing |
Still water takes no random ticks. Still lava does, which is how a lava pool sets fire to what is above it.
Skipping a delay
A block can be flagged for random ticks and schedule ticks as well, and one
updateTick serves both. A random draw then does the work early, before the
delay it was waiting on has run out:
| Block | An early draw |
|---|---|
| toggles inside its 2 ticks | |
| release inside their 20 | |
| spreads and burns down inside its 40 | |
| recompute their flow inside their 5 and 30 |
The odds are the random-tick odds — about 1 in 410 for each tick the block spends waiting, and nothing at all beyond 9 chunks from a player.
The
Redstone Repeater and the
Dispenser are not flagged,
and neither are falling
Sand and
Gravel. Random ticks never
cut their delays short.
Display ticks
The client runs a random tick of its own for particles. Once a tick it takes 1000 stabs at a block within 15 in each direction of the player and asks it for a display effect, which is what makes torches smoke and portals shimmer. None of it touches the world, and a server never does it.
The world clock
The world time advances by one every tick, and a full day is 24000 ticks — 20 minutes. Sky light is recalculated from it each tick, and every renderer is refreshed on the ticks where the figure changes.
Weather runs on countdowns of its own, which advance once a tick.
Every 40th tick starts a save. A server writes at most 24 modified chunks before leaving the rest until next time, singleplayer at most 2.
While every player is asleep a server stops waiting 50 milliseconds between ticks and runs them as fast as it can.
In multiplayer
The server ticks the world. A client ticks a world that only advances its clock, reads packets and updates entities: it spawns no mobs, runs no scheduled ticks, draws no random ticks, and keeps no weather timers.
Block updates are suppressed on a client too, so a block a player places changes nothing around it until the server says so.
Falling behind
A server that cannot keep up clamps the gap since its last pass to 2000
milliseconds and logs Can't keep up! Did the system time change, or is the server overloaded?. Ticks past the 40 that fit in that gap are never run, and
the world falls behind real time.
Singleplayer has no warning and no catch-up past 10 ticks a frame, so the world runs slow below 2 frames a second.