Mojira Archive
MC-29844

Big Oak Trees fail to generate in Forest Biomes

Big Oak Trees completely fail to generate in Forest, Flower Forest, etc ...
This bug seems worse than MC-11208 since big trees doesn't even attempt to generate, instead of being generated weirdly
In jungle biomes, however, they are replaced by trees with generical spherical foliage

Steps to reproduce :
_Find a Biome in which Oak Trees can spawn naturally
_Notice how Big Oak Trees are missing

Alternate way :
_Create a superflat world of a Forest for exemple with decorations enabled
_Notice how Big Oak Trees are missing


Turns out it's a so-called "FPS fix" by [Mojang] Jeb (Jens Bergensten)

http://www.reddit.com/r/Minecraft/comments/1m97cw/while_you_are_all_crying_over_the_name_change_of/

The reason they got removed was because they don't follow the leaf decay rules, and thus caused a LOT of chunk updates. I basically doubled my FPS in forests by removing these.

My intention was not to remove them completely, though, but rather "fix them later". The problem now is that the code for those trees is super-complex, and not the easiest thing to work with.

Problem description: Leaves must be placed so they are connected via other leaves to a tree trunk, max 4 steps away. Where's the bug?
...

BigTree source code from Jeb: big_tree.java

Paul Spooner, original maker of Forester Filter and gave the Big Tree generation code to Notch, says:

The stuff you're looking for is in the "foliageShape" function. I suggest replacing the line:

else if ((y == 0) || (y == (foliageHeight - 1))) return (float) 2;

with the following two lines

else if ((y == 0) || (y == (foliageHeight - 2))) return (float) 2;
else if (y == (foliageHeight - 1)) return (float) 1.5;

The change should reduce the size of the foliage clusters and prevent decay.