Random Tick
Minecraft Wiki article. Categories: Minecraft_stubs, Stubs, Pages_needing_images, Verify, Java_Edition_technical, Bedrock_Edition, Game_terms
This article is reproduced from Random Tick on the Minecraft Wiki. Mirrored from revision 3724601. It is licensed CC BY-NC-SA 3.0 by the Minecraft Wiki contributors — not under the Codex’s CC BY-SA 4.0, and it may not be used commercially. Edits belong upstream, not here.
Instructions: Add more detail from code, and add list of estimation times
The specific instructions are: Add crops, spreading, uprooting, growth particles, all blocks that can be random ticked
Random ticks is a feature that updates blocks in every sub-chunk around the player. Most blocks do not respond to this, but some that have a random-ticking function implemented perform some kind of action, like growing, spreading, or decaying. One of these updates is called a random tick.
Calculation
The position for a random tick is calculated by choosing random blocks inside a subchunk during the chunk tick phase. The number of blocks is determined by the /gamerule random_tick_speed, a direct relationship in Java Edition when the value is the number of blocks chosen, while in Bedrock Edition it only specifies the relative speed instead of the exact number. Subchunks are 16 block vertical segments inside each chunk, with a volume of 16x16x16. If any block chosen has a random-ticking function, it will be called and the block might do something. Any block in the subchunk can be chosen, including air.
One block can also be chosen multiple times.[Java Edition only][verify]
The chance of a block being selected at least once is then: [note 1], where n is the number of blocks selected. This is for default random tick speed.
- ↑ This assumes that a block can be selected multiple times, otherwise the chance that a block is selected is . The difference between these results is very small though.
Effects
Many things may happen when a block is random-ticked, including:
Crops may grow or uproot.
Mushrooms may spread or uproot.
Vines,
twisting vines,
weeping vines, and
cave vines may spread.
Ice and
snow layers may melt.
Leaves may decay.
Farmland hydration is updated.
Cactus,
sugar cane,
kelp,
bamboo,
chorus flowers,
mangrove propagules,
sweet berry bushes,
cocoa pods and
nether wart may grow.
Grass blocks and
mycelium may spread.
Grass blocks,
mycelium, and
nylium may decay (only if the condition is met).
Saplings may grow into a tree.
Lava may set fires nearby.[note 1]
Mud may turn into
clay if placed on top of a block with
pointed dripstone underneath.
Lit redstone ore turns off.
Nether portal blocks may spawn a zombified piglin.
Turtle eggs crack or hatch.
Budding amethyst may grow an
amethyst bud on any of its sides as longs as there is no solid block.
Copper blocks (or any of its non-oxidized variants) may advance one stage in oxidation.
Pointed dripstone may fill a
cauldron below.
Pointed dripstone and
sulfur spikes may grow a stalagmite/stalactite if the conditions are met.
Dried ghasts start a 250 second delay (5000 ticks) until they hydrate or dehydrate.
Eyeblossoms may change state.
Fire and
soul fire, may burn out or spread.[BE only]
- ↑ In Java Edition, this requires a player within an 8-chunk radius. However,
/gamerule allowFireTicksAwayFromPlayerremoves this requirement if set to true.
Time estimation
Because random block ticks are granted randomly, there is no way to predict when a block can receive its next tick. In Java Edition, the median time between ticks is 47.30 seconds ( 946.03 game ticks). That is, there is a 50% chance for the interval to be equal or shorter than 47.30 seconds and a 50% chance for it to be longer than 47.30. However, sometimes it is much longer or shorter: for example, there is a 1.38% chance for the interval to be less than one second and a 1.23% chance for the interval to be over five minutes. On average, blocks are updated every 68.27 seconds ( 1365.33 game ticks). For the math behind these numbers, see the Wikipedia entries for the geometric distribution.
Some blocks also have additional conditions for growing, Nether wart for instance has only a 10% chance to grow one growth stage, and it also has a 3 growth stages until it is fully grown. This means that it takes much longer than 68.27 seconds for Nether wart to fully grow on average. In total, it will now take 34.1333 minutes for nether wart to grow.
Create a list of growth times here for each crop in the game.
Navigation
Sources
- Random Tick — Minecraft Wiki, CC BY-NC-SA 3.0, revision 3724601.