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

From SAS Gaming Wiki
(Redirected from Minecraft:Random ticks)

Template:Stub Template:More images

A random tick is a feature that updates blocks in every sub-chunk around the player. Blocks that update in this Minecraft:tick will perform an action, usually spreading or changing their state.

Calculation

Template:Main The position of 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 may 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}{1365.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 has only a 10% chance to grow one growth stage, with 3 growth stages before it is fully grown. This means that it takes 34.1333 minutes on average for nether wart to fully grow.

Navigation

Template:Navbox Java Edition technical Template:Navbox Bedrock Edition