QtCraft API C++ classes QML types Handbook

QcSpawnerDefinition Struct

What makes a block a monster spawner ("spawner" in block data, decision E-520): the rules it spawns its creature kind by. More...

Header: #include <common/content/blockbehaviour/QcSpawnerDefinition.h>

Public Variables

int areaX
int areaY
int areaZ
int count
bool isSpawner
double maxDelay
int maxLight
int maxNearby
double minDelay
QString mob
int nearbyRange
double range

Static Public Members

const int maxArea
const int maxCount
const double maxDelaySeconds
const int maxNearbyLimit
const double maxRange

Detailed Description

The kind itself belongs to each placed spawner (its block entity, QcSpawners); mob is only the kind a spawner starts with when nothing else names one. Server side only.

Member Variable Documentation

int QcSpawnerDefinition::count

Spawn attempts per cycle, each at a random cell of the area.

bool QcSpawnerDefinition::isSpawner

Whether the block is a spawner at all.

const int QcSpawnerDefinition::maxArea

Largest spawn area size and nearbyRange the parser accepts.

const int QcSpawnerDefinition::maxCount

Largest count.

const double QcSpawnerDefinition::maxDelaySeconds

Longest minDelay and maxDelay in seconds.

int QcSpawnerDefinition::maxLight

Block light at a spawn cell at most (like natural spawning, sky light does not count).

const int QcSpawnerDefinition::maxNearbyLimit

Largest maxNearby.

const double QcSpawnerDefinition::maxRange

Largest range in blocks.

QString QcSpawnerDefinition::mob

Kind a spawner of this block starts with (empty: none, it waits for /setblock or the world generator to name one).

double QcSpawnerDefinition::range

A player must be within this many blocks of the block's centre for it to work.