Basically renaming anything related to leaves in the new function to something more broad such as foliage, so vines aren't indirectly considered leaves. An aesthetic change, basically.
Simply put, this commit changes some code so that leaves don't use `param2` to see if they rot or not, and will now use the biome colours.
This commit also makes it so vines do the same (use biome colours).
* The leaf decay ABM no longer scans all leaves nodes. Now only
"orphaned" leaves are decayed. These nodes are placed by callbacks
in tree trunk nodes upon their destruction.
* This commit also removes the tree trunk node caching system and an
abm throttling mechanism and its associated globalstep function.
* Check if node has a definition table before attempting to evaluate its
attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
and improve readability.
Previously tree saplings would grow regardless of the blocks above it.
This could be abused to destroy bedrock and other nodes.
To solve this, checks are added for nodes around the trees. The volume
checked depends on the tree type. The volume for each tree has been set
so reject trees where branches would grow into other nodes. Some nodes
types like torches, plants and wood are ignored in the checks.
Saplings in a 2x2 formation will grow into normal trees if there is no
room for a huge tree. Oak trees has separate checks for balloon oak
trees and normal oak trees, if there is no room for a balloon oak, it
becomes a normal oak tree.