QcMineshaftPlan Struct
One mine shaft as the terrain generator builds it (decision E-570): a pure function of the seed, the region and the content, planned from the terrain noise alone (never from generated chunks), so every chunk writes its own cells of it and a mine shaft spanning chunks comes out the same in any generation order (QcMineshaftBuilder). More...
| Header: | #include <worldgen/mineshafts/QcMineshaftPlan.h> |
Public Types
Public Functions
| void | bound() |
| void | forEachOpenCell(const Visit &visit) const |
| bool | touches(int x0, int z0, int x1, int z1) const |
Public Variables
| QList<QcPlacedBlock> | blocks |
| QList<QcBlockPos> | carts |
| QList<QcMineshaftPlan::Corridor> | corridors |
| std::optional<QcMineshaftPlan::Entrance> | entrance |
| int | levels |
| int | maxX |
| int | maxZ |
| int | minX |
| int | minZ |
| QList<QcMineshaftPlan::Node> | nodes |
| QList<QcBlockPos> | pillars |
| int | regionX |
| int | regionZ |
| QList<QcMineshaftPlan::Room> | rooms |
| QList<QcMineshaftPlan::Spawner> | spawners |
Static Public Members
| void | forEachCell(const QcMineshaftPlan::Corridor &corridor, Visit &visit) |
| void | forEachCell(const QcMineshaftPlan::Node &node, Visit &visit) |
Detailed Description
Cells are world positions; a corridor's or a node's "feet" cells are the lowest open cells, its floor lies one below.
Member Function Documentation
void QcMineshaftPlan::bound()
Sets the columns touched by its open cells, blocks, entrance and rooms, and one more around.
[static] template <typename Visit> void QcMineshaftPlan::forEachCell(const QcMineshaftPlan::Corridor &corridor, Visit &visit)
Calls visit with every open cell of corridor (three lanes, its height high).
[static] template <typename Visit> void QcMineshaftPlan::forEachCell(const QcMineshaftPlan::Node &node, Visit &visit)
Calls visit with every open cell of node.
template <typename Visit> void QcMineshaftPlan::forEachOpenCell(const Visit &visit) const
Calls visit with every cell the plan opens: nodes, corridors and the entrance's shaft.
bool QcMineshaftPlan::touches(int x0, int z0, int x1, int z1) const
Returns whether the columns x0 to x1, z0 to z1 (inclusive) share a column with the plan's bounds.
Member Variable Documentation
QList<QcPlacedBlock> QcMineshaftPlan::blocks
Supports, rails, cobwebs, lights and spawners, placed after the corridors are open.
QList<QcBlockPos> QcMineshaftPlan::carts
Rail cells that hold a chest minecart.
QList<QcMineshaftPlan::Corridor> QcMineshaftPlan::corridors
The corridors and staircases between the nodes.
std::optional<QcMineshaftPlan::Entrance> QcMineshaftPlan::entrance
The way up to the surface, if it has one.
int QcMineshaftPlan::levels
The number of levels made.
QList<QcMineshaftPlan::Node> QcMineshaftPlan::nodes
The nodes, the central room first.
QList<QcBlockPos> QcMineshaftPlan::pillars
Floor cells with a pillar down to the ground below them where the floor is open.
int QcMineshaftPlan::regionX
The x of the region it was planned for.
int QcMineshaftPlan::regionZ
The z of the region it was planned for.
QList<QcMineshaftPlan::Room> QcMineshaftPlan::rooms
The rooms from structures at dead ends.
QList<QcMineshaftPlan::Spawner> QcMineshaftPlan::spawners
The spawners in the corridors.