QcServerInteraction Class
What players do to the world: mining blocks, using blocks and items (opening machines, toggling doors, switching levers, tilling, carving, lighting fire, placing blocks and building golems from them, scooping liquids) and using creatures (feeding, repairing golems, catching). More...
| Header: | #include <server/gameplay/QcServerInteraction.h> |
Public Types
| struct | Parts |
Public Functions
| void | finishMining(QcServerClient &client, QcBlockPos pos) |
| void | swingWhileMining() |
| void | useEntity(QcServerClient &client, quint32 entityId) |
| void | useItem(QcServerClient &client, const QcMsg::UseItem &message) |
Static Public Members
| const int | miningToleranceTicks |
Detailed Description
Member Function Documentation
void QcServerInteraction::finishMining(QcServerClient &client, QcBlockPos pos)
Handles the claim of client that it broke the block at pos.
void QcServerInteraction::swingWhileMining()
While a player mines, the arm swings again every swing length (QcSwingSpeed of their status effects, decision E-881; simulated ticks only), in step with their own client's loop.
void QcServerInteraction::useEntity(QcServerClient &client, quint32 entityId)
Handles a use of client on the entity entityId.
void QcServerInteraction::useItem(QcServerClient &client, const QcMsg::UseItem &message)
Handles a use of the held item of client (message).
Member Variable Documentation
const int QcServerInteraction::miningToleranceTicks
Ticks of slack (of 50 ms) when checking a client's claim that a block is broken (network jitter); at a slower tick rate the latest tick's real time counts as slack too, since the players' time only moves with the ticks (decision E-249).