QtCraft API C++ classes QML types Handbook

QcMobExchange::BlockAction Struct

struct QcMobExchange::BlockAction

A block a creature takes or puts down in a tick (a shadewalker, decision E-460), which the server carries out after the tick with the usual block changes (QcCreatureTraits): taking only when block is still there, placing only into air; dropping (game rule mobGriefing off) lets the carried block fall as an item. More...

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

Public Types

enum class Kind { Take, Place, Drop }

Public Variables

QcBlockId block
QcMobExchange::BlockAction::Kind kind
quint32 mob
QcBlockPos pos

Detailed Description

Member Type Documentation

enum class BlockAction::Kind

What the creature does with the block.

ConstantValueDescription
QcMobExchange::BlockAction::Kind::Take0It takes the block.
QcMobExchange::BlockAction::Kind::Place1It puts its carried block down.
QcMobExchange::BlockAction::Kind::Drop2It lets its carried block fall as an item.

Member Variable Documentation

QcBlockId BlockAction::block

The block taken or put down.

QcMobExchange::BlockAction::Kind BlockAction::kind

What it does.

quint32 BlockAction::mob

Entity id of the creature.

QcBlockPos BlockAction::pos

Where the block is or goes.