QtCraft API C++ classes QML types Handbook

QcBlockEntities::Container Struct

struct QcBlockEntities::Container

The contents of a container block (chest, barrel, hopper, dispenser). More...

Public Functions

bool isFilled() const
bool isPlain() const

Public Variables

QString name
QcBlockPos pos
quint64 readyAt
QList<QcItemStack> stacks

Detailed Description

Member Function Documentation

bool Container::isFilled() const

Returns whether something lies in one of its slots.

bool Container::isPlain() const

Returns whether it holds nothing, has no cooldown and no name: the same as a new one (not saved, forgotten with its chunk).

Member Variable Documentation

QString Container::name

The custom name of the item it was placed from (decision E-873), the title of its screen and the name of the item it drops; empty for none.

QcBlockPos Container::pos

The position of the block.

quint64 Container::readyAt

A Signal Hopper rests until this tick after moving an item (decision E-344); 0: never moved.

QList<QcItemStack> Container::stacks

The item stacks in its slots, one per slot.