Tutorials/Huge fungus generation

Jargon is defined below:

hat: The 'leaves' of a huge fungus that generate around the trunk. This does not include vines

vines: The wart blocks/weeping vines generated on the bottom of a hat

ring value: Equidistant (square radii) layers from the centre of the trunk

decoration: Shroomlights

peak: A region of the hat that is equidistant from the trunk, i.e. all have the same ring value

If a player bonemeals a fungus, and if that fungus is directly above its respective nylium block (e.g. warped fungus on warped nylium), there will be a 40% chance that it will grow. So if a player bonemeals a fungus 4 times, there will be an 87.04% chance it will grow, (99.998% chance if 20 attempts are made).

A fungus plant (the 'sapling' of huge fungi), will not grow by itself through random ticks, unlike traditional saplings.

When a fungus grows, it doesn't check for blocks above or around it, or which dimension it’s in, this allows for pistons to be situated adjacent to the trunk, allowing for extremely fast cycle speeds.

A fungus will not grow if it is obscured by the height limit or if it is placed outside of the world.

To determine the height of a huge fungus, a random integer is picked between 4 and 13 [inclusive], then there is a 1/12 chance for that integer to be doubled. This integer is the height of the trunk in stem blocks, meaning that the tallest tree can be 27 blocks tall (as the top is covered in hat blocks) with a 1/120 chance of generating.

Now the process of generating the hat of the farm is quite complex in comparison

First of all a hat height (h) value is found using the same equation for the height of the tree. This value is later used to determine multiple other variables that we’ll touch onto shortly

The first of which is the hat’s height off the ground (i) which is found from taking the minimum value of either a random integer up to (1 + h/3) + 5, or h.

The height of the hat from bottom to top (j) is found by h - i

The ring value (l) at a specific height (k) is equal to 2 if k < h – a random integer up to 3, otherwise it is equal to 1, also if i > 8 and k < j + 4 then l = 3. This statement allows for 1 3-wide layer of a huge fungus to form, this can only ever occur in tree’s that are at least 8 blocks off the ground. While it may look like some huge fungi have more than 1 layer of 3 wide growth, these additional layers are actually vines which are generated separately from the ‘brim’ (3 wide layer).

The height of each peak of a huge fungus is found by analysing the value of a random integer up to 3, which was housed in the earlier equation used for calculating ‘l’.

To further our discussion on huge fungus generation we will need to split it up into 4 distinct zones:

Inner: redstone blocks

External: white stained glass

Corners: yellow stained glass

Vines: lime stained glass

Each zone has its own chance of generating a block per coordinate in 3D space, as well as a chance of the block being decorative.

We will be ignoring vines for the time being, they are here just to illustrate where the bottom of the hat begins.

This truth table demonstrates the possible outcomes for a particular block