QtCraft API C++ classes QML types Handbook

QcCircuitComponents::Context Struct

struct QcCircuitComponents::Context

What the components decide on: the world before the step and what the tick knows. More...

Public Variables

QcBlockEntities &entities
quint64 now
const QHash<QcBlockPos, quint8> &pistonActs
const QcCircuitComponents::Plates &plates
QcSignalPower power
bool quasiConnectivity
const QcRails::Table &rails
const QcComparatorReadings &readings

Detailed Description

Member Variable Documentation

QcBlockEntities &Context::entities

What components remember at their position and their scheduled ticks.

quint64 Context::now

The current tick.

const QHash<QcBlockPos, quint8> &Context::pistonActs

Pistons that already extended (bit 1) or retracted (bit 2) in this tick.

const QcCircuitComponents::Plates &Context::plates

What lies on plates and touches tripwire in this tick.

QcSignalPower Context::power

A view of the world and the signal table, copied.

bool Context::quasiConnectivity

The world's game rule; each piston can also refuse it in data.

const QcRails::Table &Context::rails

The tracks of rails (the lines of powered and activator rails).

const QcComparatorReadings &Context::readings

What comparators read from containers and readable blocks.