QcShowcaseSettlement Namespace
The village station of the showcase (decision E-490), east of the rows of the village area: a bed growthGap blocks beyond the first row, which that row's village grows to hold, and gap blocks beyond the rows a settlement within one chunk: three beds and a composter, a ripe wheat field within reach of the composter, a chest of bread to throw, two homeless villagers that move in, and a short rail with a minecart to carry one away. More...
| Header: | #include <worldgen/showcase/QcShowcaseSettlement.h> |
Classes
| struct | Frame |
Variables
Functions
| int | areaWidth(int x) |
| QList<QcBlockPos> | build(const QcShowcaseContext &context, QcStructure &area, QcBlockPos origin, QcShowcaseSettlement::Frame frame) |
| int | settlementX(int rowsWidth, int west) |
| std::optional<int> | settlementZ(int depth, int north, int frontGap) |
Detailed Description
The beds and the composter are points of interest of the area (QcShowcaseArea::pointsOfInterest): they count as placed, not as part of a village plan.
Variable Documentation
const int QcShowcaseSettlement::gap
Blocks between the rows' east edge and the settlement (beyond joining any row).
const int QcShowcaseSettlement::growthGap
Blocks between the first row's east edge and the bed that makes it grow.
Function Documentation
int QcShowcaseSettlement::areaWidth(int x)
Returns the width the area needs to hold the settlement at local x x (with a gap beyond it).
QList<QcBlockPos> QcShowcaseSettlement::build(const QcShowcaseContext &context, QcStructure &area, QcBlockPos origin, QcShowcaseSettlement::Frame frame)
Builds the station into area (whose north west corner on the ground is origin) with the blocks of context, where frame says; returns its points of interest in world coordinates.
int QcShowcaseSettlement::settlementX(int rowsWidth, int west)
Returns the local x of the settlement for rows rowsWidth wide in an area whose west edge is at world x west: chunk aligned.
std::optional<int> QcShowcaseSettlement::settlementZ(int depth, int north, int frontGap)
Returns the local z of the settlement in an area depth deep whose north edge is at world z north: chunk aligned, and the settlement ends at least frontGap blocks before the area's south edge (beyond the reach of the areas south of it); none when the area is too shallow.