Minecraft – the average rate at which sufficiently lit grass spreads in a line

minecraft-java-edition

A line of dirt surrounded by water.

I've built those corridors that let me go across the lake. As I went back and forth on them to reach my mine and shelter, I noticed the grass slowly advancing over the area. This gave me a crazy idea for time tracking: the stochastic calendar.

To make sense of it all, however, I need this piece of information:

What is the rate at which sufficiently illuminated grass spreads on a single line?

If I built a dirt line long 30 blocks, with one block at one end covered in grass, how much time would it take on average for this stochastic calendar to be fully covered in grass?

Best Answer

Watching grass grow will not help you tell the time.

Digging through the Minecraft source code to find an answer to your question revealed the following problems with calculating an average time for grass to grow:

  • It checks for grass two blocks in the North and East direction but only one block in the South and West. On the surface this appears to double the rate of growth depending on the direction your dirt column is oriented, but it is more complicated than this because the grass may actually skip a dirt block, creating random acceleration in the growth as well as a random interval.
  • The test for a nearby grass block to 'grow off' is from a randomly selected cube 4*4*6 blocks around the dirt block (it seems that grass grows downwards faster than any other direction. Interesting but irrelevant). You would need to provide a totally grass free area around the start of your dirt column EXCEPT for one grass block at the beginning of it, otherwise it will start off faster and then slow down. If the starting grass block decides to grow of it another direction you are back to square one with an uneven growth probability.
  • The actual time taken between these random checks is buried deep inside the Entity Renderer. Both the frame-rate (for every single frame for the duration of the growing period) and the rendering quality (from the option menu) will have a significant impact on how often it will check for a nearby grass block.

So what we have is a cascading series of random probabilities tied in with the rendering speed of your computer defining the 'average' speed that grass grows.

Okay, but what is the average time it takes grass to grow

After about 20 samples of the growth rate in game I calculated an average speed of one growth every 2 minutes 45 seconds. However, this figure is only accurate on my PC, was calculated by ignoring blocks that were way outside of the standard deviation (grew too fast or slow) and is a very rough approximation.

There is still hope!

So your hopes of telling time stochastically from grass are riddled with problems, but there are other methods of building giant in-game clocks. Since redstone repeaters are Turing complete and perfectly timed, it is entirely possible to build a fully functional clock in Minecraft.