QcCaveCarver Class
Connected cave systems: spaghetti tunnels of varying width and caverns with pillars, evaluated on a coarse lattice and interpolated. More...
| Header: | #include <worldgen/terrain/QcCaveCarver.h> |
Public Functions
| void | carve(QcChunk &chunk, const QcTerrainColumnGrid &columns) const |
| bool | enabled() const |
| bool | isCave(int x, int y, int z, const QcTerrainColumn &column) const |
| int | top(const QcTerrainColumn &column, int x, int z) const |
Detailed Description
Caves stay below a rock roof except in entrance patches and hold lava lakes deep down.
Member Function Documentation
void QcCaveCarver::carve(QcChunk &chunk, const QcTerrainColumnGrid &columns) const
Carves the caves into chunk, whose terrain columns give each column's cave top: carved blocks become air, or the cave liquid at and below the liquid level; bedrock stays.
bool QcCaveCarver::enabled() const
Returns whether caves are carved at all (the terrain setting caves).
bool QcCaveCarver::isCave(int x, int y, int z, const QcTerrainColumn &column) const
Returns true where a cave carves the block at x, y, z; column is the terrain column at x, z. Always false when caves are disabled.
int QcCaveCarver::top(const QcTerrainColumn &column, int x, int z) const
Returns the highest block caves may remove in column at x, z: below a rock roof except at entrances, and six blocks below the surface in columns at or below sea level + 1, so water does not pour into caves.