Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Random Tick: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Sync: updated from Minecraft
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{about|random ticks that update blocks|other types of ticks|Ticks|the command|Game Rule # Random Tick Speed}}
{{about|random ticks that update blocks|other types of ticks|Ticks|the command|Game Rule # Random Tick Speed}}
{{stub|Add more detail, and links}}
{{stub|Add more detail from code, and add list of estimation times}}
{{More images|Add crops, spreading, uprooting, growth particles, all blocks that can be random ticked}}


Random ticks is a feature that updates [[Minecraft:block|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 [[Minecraft:grow|growing]], [[Minecraft:spread|spreading]], or decay|decaying. One of these updates is called a '''random tick'''.
Random ticks is a feature that updates [[Minecraft:block|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 [[Minecraft:grow|growing]], [[Minecraft:spread|spreading]], or decay|decaying. One of these updates is called a '''random tick'''.
Line 20: Line 21:
Many things may happen when a block is ''random-ticked'', including:
Many things may happen when a block is ''random-ticked'', including:


*[[Minecraft:Crops]] may grow or uproot.
*{{ItemSprite|Seeds}} [[Minecraft:Crops]] may grow or uproot.
*[[Minecraft:Mushroom]]s may spread or uproot.
*{{BlockSprite|Red Mushroom}} [[Minecraft:Mushrooms]] may spread or uproot.
*[[Minecraft:Vines]] may spread.
*{{BlockLink|Vines}} may spread.
*{{IN|BE}}, [[Minecraft:fire]] may burn out or spread.
*{{BlockLink|Fire}} may burn out or spread.{{only|bedrock|short=1}}
*[[Minecraft:Ice]] and [[Minecraft:snow]] layers may melt.
*{{BlockLink|Ice}} and {{BlockLink|snow}} layers may melt.
*[[Minecraft:Leaves]] may decay.
*{{BlockLink|Leaves}} may decay.
*[[Minecraft:Farmland]] hydration is updated.
*{{BlockLink|Farmland}} hydration is updated.
*[[Minecraft:Cacti]], [[Minecraft:sugar cane]], [[Minecraft:kelp]], [[Minecraft:bamboo]], [[Minecraft:chorus flower]]s, [[Minecraft:mangrove propagule]]s and [[Minecraft:sweet berry bush]]es may grow.
*{{BlockLink|Cactus}}, {{BlockLink|sugar cane}}, {{BlockLink|kelp}}, {{BlockLink|bamboo}}, {{BlockLink|chorus flower}}s, {{BlockLink|mangrove propagule}}s and {{BlockLink|sweet berry bush}}es may grow.
*[[Minecraft:Grass block]]s and [[Minecraft:mycelium]] may spread.
*{{BlockLink|Grass block}}s and {{BlockLink|mycelium}} may spread.
*Grass blocks, mycelium, and [[Minecraft:nylium]] may decay (only if the condition is met).
*{{BlockLink|Grass block}}s, {{BlockLink|mycelium}}, and {{BlockLink|nylium}} may decay (only if the condition is met).
*[[Minecraft:Sapling]]s may grow into a [[Minecraft:tree]].
*{{BlockSprite|Oak Sapling}} [[Minecraft:Sapling]]s may grow into a [[Minecraft:tree]].
*[[Minecraft:Lava]] may set fires nearby.<ref group=note>In {{JE}}, this requires a player within an 8-chunk radius. However, {{cmd|gamerule allowFireTicksAwayFromPlayer}} removes this requirement if set to true.</ref>
*{{BlockLink|Lava}} may set fires nearby.<ref group=note>{{IN|JE}}, this requires a player within an 8-chunk radius. However, {{cmd|gamerule allowFireTicksAwayFromPlayer}} removes this requirement if set to true.</ref>
*[[Minecraft:Mud]] may turn into [[Minecraft:clay]] if placed on top of a block with [[Minecraft:pointed dripstone]] underneath.
*{{BlockLink|Mud}} may turn into {{BlockLink|clay}} if placed on top of a block with {{BlockLink|pointed dripstone}} underneath.
*Lit [[Minecraft:redstone ore]] turns off.
*{{BlockLink|id=all-redstone-ore|Lit redstone ore}} turns off.
*[[Minecraft:Nether portal block]]s may spawn a [[Minecraft:zombified piglin]].
*{{BlockLink|Nether portal}} blocks may spawn a [[Minecraft:zombified piglin]].
*[[Minecraft:Turtle egg]]s crack or hatch.
*{{BlockLink|Turtle egg}}s crack or hatch.
*[[Minecraft:Campfire]] smoke appears.
*{{BlockLink|Campfire}} smoke appears.
*[[Minecraft:Budding amethyst]] may grow an [[Minecraft:amethyst bud]] on any of its sides as longs as there is no solid block.
*{{BlockLink|Budding amethyst}} may grow an {{BlockLink|amethyst bud}} on any of its sides as longs as there is no solid block.
*[[Minecraft:Block of Copper|Copper block]]s (or any of its non-oxidized variants) may advance one stage in oxidation.
*{{BlockLink|Block of Copper|text=Copper block}}s (or any of its non-oxidized variants) may advance one stage in [[Minecraft:oxidation]].
*[[Minecraft:Pointed dripstone]] may fill a cauldron below.
*{{BlockLink|pointed dripstone}} may fill a {{BlockLink|cauldron}} below.
*[[Minecraft:Pointed dripstone]] may grow a stalagmite/stalactite if the conditions are met.
*{{BlockLink|pointed dripstone}} may grow a stalagmite/stalactite if the conditions are met.


<references group="note"/>
<references group="note"/>

Latest revision as of 11:10, 8 June 2026

Template:Stub Template:More images

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 decay|decaying. One of these updates is called a random tick.

Calculation

Template:Main 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 Template:Cmd, a direct relationship Template:In when the value is the number of blocks chosen, while Template:In 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.Template:OnlyTemplate:Verify

The chance of a block being selected at least once is then: <math>1 - (\frac{4095}{4096})^{n}</math><ref group=note>This assumes that a block can be selected multiple times, otherwise the chance that a block is selected is <math>\frac{n}{4096}</math>. The difference between these results is very small though.</ref>, where n is the number of blocks selected. This is <math>1 - (\frac{4095}{4096})^3 \approx \frac{1}{11365.36} \approx 0.073224%</math> for default random tick speed.

<references group=note/>

Effects

Many things may happen when a block is random-ticked, including:

<references group="note"/>

Time estimation

Because random block ticks are granted randomly, there is no way to predict when a block can receive its next tick. Template:IN, the median time between ticks is 47.30 seconds (<math>\log_{\frac{4096-3}{4096}}(0.5) \approx</math> 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 (<math>\frac{4096}{3} \approx</math> 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

Template:Navbox Java Edition technical Template:Navbox Bedrock Edition