QtCraft API C++ classes QML types Handbook

QcMsg::WorldTime Struct

struct QcMsg::WorldTime

Server -> client: seconds since the world began and the length of a full day; running is false while the time of day stands still (game rule daylightCycle, decision E-221). More...

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

Public Variables

double dayLength
bool running
double speed
double time

Static Public Members

const double maxSpeed

Detailed Description

speed is how many server ticks pass per tick of the client's clock (tick rate / 20, the speed of a running sprint; 0 while the server is frozen; decision E-249); the client advances the time of day by it between two messages.

Member Variable Documentation

double WorldTime::dayLength

Seconds of a full day.

const double WorldTime::maxSpeed

A sprint runs as many ticks as the server manages, thousands per second in a small world.

bool WorldTime::running

Whether the time of day runs.

double WorldTime::speed

Server ticks per tick of the client's clock (see the struct).

double WorldTime::time

Seconds since the world began.