QtCraft API C++ classes QML types Handbook

QcCarryDefinition Struct

A creature that takes single blocks and puts them down again (the shadewalker, decision E-460), from its data (carries): only the blocks of blocks, and only while the game rule mobGriefing is on. More...

Header: #include <common/content/mobs/QcMobTraits.h>

Public Variables

QList<QcBlockId> blockIds
QStringList blocks
double placeChance
int reach
double takeChance

Static Public Members

const int maxBlocks

Detailed Description

Server side only.

Member Variable Documentation

QList<QcBlockId> QcCarryDefinition::blockIds

Their ids (QcBlockId of the default state), resolved when the content is finished: names without a block and an item of their own, and blocks with a block entity or of two cells, are left out with a warning; with none left it carries nothing.

QStringList QcCarryDefinition::blocks

Names of the blocks it takes (any state of them).

const int QcCarryDefinition::maxBlocks

Most block names a carrier may list.

int QcCarryDefinition::reach

How far around its feet it looks for a block (horizontally; from the floor up to reach + 1 above its feet).