QtCraft API C++ classes QML types Handbook

QcMobDefinition::SpawnRule Struct

struct QcMobDefinition::SpawnRule

One place and time where the creature spawns: the main rule (the fields above) or an extra one (spawn.also, e.g. slimes also on swamp surfaces at night). More...

Public Variables

QStringList biomes
QList<QString> blocks
bool caves
double chunkChance
bool darkness
int maxLight
int maxY
bool sky
QcMobDefinition::SpawnTime time
bool water
double weight

Detailed Description

Server side only.

Member Variable Documentation

QStringList SpawnRule::biomes

Biomes it spawns in ("biomes"), as spawnBiomes.

QList<QString> SpawnRule::blocks

Blocks it may spawn on ("blocks"), as spawnBlocks.

bool SpawnRule::caves

Also underground at any time of day ("caves"), as spawnsInCaves.

double SpawnRule::chunkChance

Share of chunks where it spawns ("chunkChance"), as spawnChunkChance.

bool SpawnRule::darkness

The monsters' light test ("darkness"), as spawnInDarkness.

int SpawnRule::maxLight

Brightest block light at the feet ("maxLight"), as maxSpawnLight.

int SpawnRule::maxY

Highest block its feet may stand in ("maxY"), as spawnMaxY.

bool SpawnRule::sky

Only under the open sky ("sky"), as spawnUnderSky.

QcMobDefinition::SpawnTime SpawnRule::time

Time of day ("time"), as spawnTime.

bool SpawnRule::water

In water ("water"), as spawnInWater.

double SpawnRule::weight

Relative weight ("weight"), as spawnWeight.