QcVoidGenerator Class
World generator of the void world type (decision E-223): air everywhere except a square platform around the spawn (worldgen/void.json: block, radius, height; radius 0 leaves it out), so that measurements see only what a scenario builds. More...
| Header: | #include <worldgen/generators/QcVoidGenerator.h> |
| Inherits: | QcWorldGenerator |
Public Functions
| QcVoidGenerator(std::shared_ptr<const QcContentRegistry> content, const QString &options = {}) |
Reimplemented Public Functions
| virtual std::shared_ptr<QcChunk> | generate(QcChunkPos pos) const override |
| virtual bool | isNaturalGround(QcBlockId block) const override |
| virtual std::optional<QcBlockId> | platformBlock() const override |
| virtual QcWorldSetup | setup() const override |
| virtual QcBlockPos | spawnPoint() const override |
Static Public Members
| QString | optionsOf(const QcVoidDefinition &settings) |
| QcResult<QcVoidDefinition> | parseOptions(const QString &options, const QcContentRegistry &content) |
Detailed Description
Its rules (noon standing still, no creatures of their own accord by default) are set up once. Deterministic, seed ignored. A world stores its platform as generator options, "platform=qtcraft:stone,radius=2,y=63", so that changed defaults do not change it.
Member Function Documentation
[explicit] QcVoidGenerator::QcVoidGenerator(std::shared_ptr<const QcContentRegistry> content, const QString &options = {})
Sets up the platform from options and the blocks and settings of content. Invalid options fall back to the content's settings with a warning; empty takes them.
[override virtual] std::shared_ptr<QcChunk> QcVoidGenerator::generate(QcChunkPos pos) const
Reimplements: QcWorldGenerator::generate(QcChunkPos pos) const.
[override virtual] bool QcVoidGenerator::isNaturalGround(QcBlockId block) const
Reimplements: QcWorldGenerator::isNaturalGround(QcBlockId block) const.
[static] QString QcVoidGenerator::optionsOf(const QcVoidDefinition &settings)
Returns the options naming the whole platform of settings.
[static] QcResult<QcVoidDefinition> QcVoidGenerator::parseOptions(const QString &options, const QcContentRegistry &content)
Returns the settings of content with those options name; an error for unknown keys or blocks and values out of range.
[override virtual] std::optional<QcBlockId> QcVoidGenerator::platformBlock() const
Reimplements: QcWorldGenerator::platformBlock() const.
[override virtual] QcWorldSetup QcVoidGenerator::setup() const
Reimplements: QcWorldGenerator::setup() const.
[override virtual] QcBlockPos QcVoidGenerator::spawnPoint() const
Reimplements: QcWorldGenerator::spawnPoint() const.