QtCraft API C++ classes QML types Handbook

QcMobReader Class

Reads one mob definition of a content pack: owns the definition being built and the reader of the mob's JSON object. More...

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

Public Functions

QcResult<QcMobDefinition> read()

Detailed Description

The parts run in a fixed order, later parts check fields that earlier parts read (the AI checks hostile, the traits check the AI). The traits of creatures that teleport, carry blocks, are tamed, swim or guard a zone are read in QcMobReaderTraits.cpp.

Member Function Documentation

QcResult<QcMobDefinition> QcMobReader::read()

Returns the mob definition read from the JSON object, or the first error found.