QtCraft API C++ classes QML types Handbook

QcFeatureDefinition Struct

A terrain feature (a feature file of a pack): a tree, a column, a single plant or a pool of liquid. More...

Header: #include <common/content/worldgen/QcWorldgenDefinitions.h>

Public Types

enum class Type { Tree, Column, Plant, Pool }

Public Variables

int attempts
QList<QString> biomes
double chance
int depth
QList<QString> groundBlocks
QString icon
QString leavesBlock
int maxHeight
int maxY
int minHeight
int minY
QString name
bool nearWater
bool onWater
int patchSize
int radius
int region
QString rimBlock
QString shape
int spacing
bool surface
QString trunkBlock
QcFeatureDefinition::Type type
QString vinesBlock

Detailed Description

Biomes place trees, columns and plants by density; pools are placed by their own rules.

Member Type Documentation

enum class QcFeatureDefinition::Type

The kind of feature ("type": tree, column, plant or pool; default tree).

ConstantValueDescription
QcFeatureDefinition::Type::Tree0A trunk of \c {trunkBlock} with a crown of \c {leavesBlock} in \c {shape}.
QcFeatureDefinition::Type::Column1A trunk of \c {trunkBlock} only, without a crown.
QcFeatureDefinition::Type::Plant2A single block (\c {trunkBlock}, given as "block") on the ground.
QcFeatureDefinition::Type::Pool3A liquid (trunkBlock, given as "block") filling the bottom of a cave; pools are tried in every chunk and are not listed by biomes.

Member Variable Documentation

QList<QString> QcFeatureDefinition::biomes

Biomes a pool may lie in; empty for all.

QList<QString> QcFeatureDefinition::groundBlocks

Blocks the feature may stand on; empty allows any solid block.

QString QcFeatureDefinition::icon

Item the handbook shows for the feature ("icon", default trunkBlock or a liquid's bucket; decision E-944).

QString QcFeatureDefinition::leavesBlock

Leaves of a tree's crown ("leaves", required for trees).

QString QcFeatureDefinition::name

Qualified name ("name").

bool QcFeatureDefinition::nearWater

Only on ground at sea level with water right next to it (sugar cane on a shore).

bool QcFeatureDefinition::onWater

Plants only: on the surface of the water of columns under the sea level, standing on the top water block (lily pads in swamps, decision E-774); ground names the water.

int QcFeatureDefinition::patchSize

Size in blocks of the patches the feature grows in (flower meadows, groves); 0 scatters it evenly. The average density stays the same.

QString QcFeatureDefinition::shape

Crown of trees (QcTreeShape::Crown): "round", "cone", "bush", or the giant trees on a 2×2 trunk "giant_cone" and "giant_round" (decision E-822).

QString QcFeatureDefinition::trunkBlock

Trunk block of trees and columns ("trunk"), the block of plants and pools ("block").

QcFeatureDefinition::Type QcFeatureDefinition::type

The kind of feature.

QString QcFeatureDefinition::vinesBlock

Vines hung on the trunk and lowest leaves of trees (a block with the state attach); empty for none.