QtCraft API C++ classes QML types Handbook

QcMobExchange::Stored Struct

struct QcMobExchange::Stored

A persistent mob as saved with the world. More...

Header: #include <server/mobs/QcMobExchange.h>

Public Variables

bool bred
double breedCooldown
QcBlockId carried
bool confined
QList<QcStatusEffect> effects
double growUp
double health
QcEntityKept kept
bool keptForBlock
double layTimer
QString name
bool noAi
std::optional<QcChunkPos> parentChunk
quint64 parentUid
bool playerBuilt
QcVec3 position
std::optional<QcTameState> tame
QcCreatureKindId type
quint64 uid
std::optional<QcVillagerRecord> villager
float yaw

Detailed Description

Member Variable Documentation

bool Stored::bred

Whether it was bred by a player.

double Stored::breedCooldown

Seconds until it can breed again (QcMobBreeding).

QList<QcStatusEffect> Stored::effects

Its status effects (decision E-450).

double Stored::growUp

Seconds until a young one grows up.

double Stored::health

Its health points.

double Stored::layTimer

Seconds until it lays next (QcCreature::layTimer, decision E-452); below 0 while not chosen.

QString Stored::name

The name a name tag gave it (QcCreature::name, decision E-866).

bool Stored::noAi

Without a mind (QcCreature::noAi, decision E-510).

std::optional<QcChunkPos> Stored::parentChunk

The chunk that parent was in when the child last saw it (QcCreature::parentChunk).

quint64 Stored::parentUid

The persistent id of its parent when it is a child of a kept family (decision E-839); 0 otherwise.

bool Stored::playerBuilt

A golem a player built (decision E-471).

QcVec3 Stored::position

Where its feet are.

std::optional<QcTameState> Stored::tame

Owner, sitting and collar of a tame one (decision E-480; its target is not saved).

QcCreatureKindId Stored::type

Its creature kind (index in the content registry).

std::optional<QcVillagerRecord> Stored::villager

A villager's home, work and profession (decision E-411).

float Stored::yaw

Where it faces (degrees).