-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Problem description
Most populators want to place objects on the surface of the world. Currently, they have to use Chunk->getHighestBlockAt() to do this, which scans down the column to find the highest block at an X/Z coordinate.
However, at least with the likes of GroundCover, we actually have this information already available within the Normal generator, because we just generated the base terrain in generateChunk. So to have GroundCover have to do chunk scans to calculate height 256 times is stupid and costs performance.
Proposed solution
generateChunk-stage populators should be able to receive a heightmap. However, this shouldn't be mandatory, since some generators won't generate a heightmap (e.g. nether).
Either that, or we should consider deleting GroundCover and integrating its functionality directly into the Normal generator itself, or specialising it to acknowledge the fact that it's typically used during generateChunk where heightmap information is available in the outer scope.
Alternative solutions or workarounds
We can optimise getHighestBlockAt() harder, I guess?
We could also include a terrain heightmap in Chunk...
Metadata
Metadata
Assignees
Labels
Type
Projects
Status