QtCraft API C++ classes QML types Handbook

QcMsg::InventoryState Struct

struct QcMsg::InventoryState

Server -> client: the receiving player's complete inventory, crafting grid and armour slots. More...

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

Public Variables

QList<QcItemStack> craftingGrid
QcItemStack craftingResult
qint32 craftingSize
QcEquipment equipment
qint32 selected
QList<QcItemStack> stacks

Static Public Members

const int craftingCells

Detailed Description

Member Variable Documentation

const int InventoryState::craftingCells

The cells of the crafting grid; the decoder refuses more.

QList<QcItemStack> InventoryState::craftingGrid

The craftingCells cells of the crafting grid, row-major.

QcItemStack InventoryState::craftingResult

What the grid crafts now; empty when nothing.

qint32 InventoryState::craftingSize

The grid's size in use: 2 in the inventory, 3 at a crafting table.

QcEquipment InventoryState::equipment

The armour slots.

qint32 InventoryState::selected

The selected hotbar slot.

QList<QcItemStack> InventoryState::stacks

The inventory slots (QcInventory::allSlots).