QcSpawnGround Namespace
Where creatures that walk may appear by themselves (decision E-836), the same for every kind instead of a block list per creature: the ground is a solid block whose top face is full and that is drawn opaque (no glass, leaves or ice, no lower slab, path or farmland; an upper slab and a double slab carry), and neither ground nor the cells of feet and head hurt or hold a body (QcBlockDefinition::keepsSpawnsAway). More...
| Header: | #include <common/physics/QcSpawnGround.h> |
Types
| enum class | Carrying { All, Some, None } |
Functions
| bool | carries(const QcContentRegistry &content, QcBlockId ground) |
| QcSpawnGround::Carrying | carryingOf(const QcContentRegistry &content, quint32 type) |
| bool | leavesRoom(const QcContentRegistry &content, QcBlockId cell) |
Detailed Description
The cells of feet and head are free: not solid, no liquid, no rail. A spawn rule's blocks may still narrow the ground down (peaceful animals on grass).
Type Documentation
enum class QcSpawnGround::Carrying
How many states of a block carry spawns (the handbook's tables): all, some (slabs: only the upper and the double one) or none.
| Constant | Value | Description |
|---|---|---|
QcSpawnGround::Carrying::All | 0 | Every state carries. |
QcSpawnGround::Carrying::Some | 1 | Some states carry. |
QcSpawnGround::Carrying::None | 2 | No state carries. |
Function Documentation
bool QcSpawnGround::carries(const QcContentRegistry &content, QcBlockId ground)
Returns whether a creature may appear standing on the block state ground of content.
QcSpawnGround::Carrying QcSpawnGround::carryingOf(const QcContentRegistry &content, quint32 type)
Returns how many states of the block type (an index into QcContentRegistry::blocks()) of content carry spawns.
bool QcSpawnGround::leavesRoom(const QcContentRegistry &content, QcBlockId cell)
Returns whether a creature's feet or head may be in the block state cell of content when it appears.