QtCraft API C++ classes QML types Handbook

QcMineshaftGenerator Class

Builds the mine shafts of the terrain generator into its chunks (decision E-570): each chunk writes its own cells of the mine shaft of every region it overlaps (a mine shaft stays inside its region; QcMineshaftPlanner, plans cached by region, QcMineshaftBuilder), in any order with the same result. More...

Header: #include <worldgen/mineshafts/QcMineshaftGenerator.h>

Public Functions

void build(QcChunk &chunk) const
void buildEntrances(QcChunk &chunk) const
QcChunkFurnishing furnishingIn(QcChunkPos pos) const
std::shared_ptr<const QcMineshaftPlan> planOf(int regionX, int regionZ) const
const QcMineshaftPlanner &planner() const
QList<std::shared_ptr<const QcMineshaftPlan>> plansTouching(QcChunkPos pos) const

Detailed Description

The spawners' kind, the chest minecarts with their loot and what rooms from structures bring along come with furnishingIn(). Thread-safe.

Member Function Documentation

void QcMineshaftGenerator::build(QcChunk &chunk) const

Writes the cells of the mine shafts touching chunk into it, without their entrances (QcMineshaftBuilder::build).

void QcMineshaftGenerator::buildEntrances(QcChunk &chunk) const

Writes the surface entrances into chunk, after the terrain's features and surface pools.

QcChunkFurnishing QcMineshaftGenerator::furnishingIn(QcChunkPos pos) const

Returns the spawners (with the settings' creature), the chest minecarts (with the loot table and a seed) and what the rooms from structures bring along (chests, spawners and minecarts) in the chunk pos.

std::shared_ptr<const QcMineshaftPlan> QcMineshaftGenerator::planOf(int regionX, int regionZ) const

Returns the plan of the region regionX, regionZ, planned once (null without a mine shaft).

const QcMineshaftPlanner &QcMineshaftGenerator::planner() const

Returns the planner whose mine shafts this generator builds.

QList<std::shared_ptr<const QcMineshaftPlan>> QcMineshaftGenerator::plansTouching(QcChunkPos pos) const

Returns the mine shafts whose cells may lie in the chunk pos.