QtCraft API C++ classes QML types Handbook

QcSnowfall Class

Snow settling on the ground (decision E-396). More...

Header: #include <server/weather/QcSnowfall.h>

Public Functions

quint64 columns() const
quint64 layers() const
void tick()

Static Public Members

const int reach

Detailed Description

While it snows, every tick looks at a few random columns near each player (columnsPerTick of the content's weather, within reach blocks) and puts a snow layer on top of a column where snow falls on it (QcServerWeather::isSnowingAt: a cold climate or high up, the open sky, a loaded column), the cell is air and the block below is opaque with a full top face (not on ice, glass, leaves or another layer). The cost per tick is bounded by the players, not by the world; snow piles up over minutes like in the reference game and never fills the world: one layer per column, no layer under a roof. Snow does not melt (the reference game melts it only by block light, which this game leaves out).

Member Function Documentation

quint64 QcSnowfall::columns() const

Returns the columns looked at since the server started (tests, measurements).

quint64 QcSnowfall::layers() const

Returns the snow layers put down since the server started (tests, measurements).

void QcSnowfall::tick()

One simulated tick.

Member Variable Documentation

const int QcSnowfall::reach

Columns within this many blocks of a player (each axis) get snow.