QtCraft API C++ classes QML types Handbook

QcMsg::OpenMachine Struct

struct QcMsg::OpenMachine

Server -> client: the player opened the machine at pos, or with an empty category the storage block (chest) there; MachineState follows. More...

Header: #include <common/protocol/QcMachineMessages.h>

Public Variables

QString category
quint32 entity
qint32 heldSlot
QString name
QcBlockPos pos

Static Public Members

const qint32 noHeldSlot

Detailed Description

Member Variable Documentation

QString OpenMachine::category

The machine's category (QcMachineDefinition::category); empty for a storage block.

quint32 OpenMachine::entity

A container minecart (entity id, decision E-386) instead of the block at pos; 0 for a block.

qint32 OpenMachine::heldSlot

A backpack opened from the hand (decision E-833): the hotbar slot that holds it, locked while the screen is open, which shows only the backpack's slots and the hotbar; -1 for a block or cart.

QString OpenMachine::name

The custom name of the chest or machine (decision E-873), the screen's title; empty: the block's own name.

const qint32 OpenMachine::noHeldSlot

The heldSlot of a block or cart.

QcBlockPos OpenMachine::pos

The block of the machine or chest.