08-23-2020, 04:15 PM
There are multiple caches in the worldgen - biome cache, height cache, composition cache. Getting rid of them would be unwise, they save a LOT of work. For example the biome cache measured more than 90 % cache hit rate during startup world generation - that means ~10x speedup just thanks to the cache.
If I remember correctly, the terrain height is used in trees generator to see if the trunk and branches (all log blocks, in fact) intersect the terrain, if not, the tree is not generated; for this to work, it needs to see into the neighboring chunk as well (bent acacia trees' trunks and branches may go off-chunk). So no, it can't be removed, otherwise you end up with tree parts on chunk borders that generate in one chunk but don't generate in the other chunk. Can you imagine how long this took to actually get right?
If you want to threadpool the worldgen, you need to make the caches thread-safe and share them among all the threads / tasks.
If I remember correctly, the terrain height is used in trees generator to see if the trunk and branches (all log blocks, in fact) intersect the terrain, if not, the tree is not generated; for this to work, it needs to see into the neighboring chunk as well (bent acacia trees' trunks and branches may go off-chunk). So no, it can't be removed, otherwise you end up with tree parts on chunk borders that generate in one chunk but don't generate in the other chunk. Can you imagine how long this took to actually get right?
If you want to threadpool the worldgen, you need to make the caches thread-safe and share them among all the threads / tasks.