QcLightTable Class
How every block state treats light, indexed by runtime block id (decision E-389): the opacity (light lost entering the cell, 15 stops it), the block light it gives off and the faces light cannot cross (QcLightPassage). More...
| Header: | #include <common/light/QcLightTable.h> |
Public Types
| struct | Entry |
Public Functions
| QcLightTable() | |
| const QcLightTable::Entry & | entry(QcBlockId id) const |
| bool | hasLightSources() const |
Static Public Members
| const int | maxLevel |
Detailed Description
Built once from the content on both sides; the light engine of the server and of the client read the same values. Immutable after construction.
Member Function Documentation
[constexpr noexcept default] QcLightTable::QcLightTable()
Without content every id reads as air.
const QcLightTable::Entry &QcLightTable::entry(QcBlockId id) const
Returns the entry of the block state id; unknown ids read as air.
bool QcLightTable::hasLightSources() const
Returns whether any block state gives off light.
Member Variable Documentation
const int QcLightTable::maxLevel
The highest light level.