|
|
| Block (BlockID id, Layer layer, const Geometry *geo) |
| |
|
| Block (BlockID id, Layer layer, const Geometry *geo, RotationMode rotationMode) |
| |
|
virtual bool | onInteract (InteractContext *context) const |
| |
|
virtual void | onDestroyed (const BlockSetContext &context) const |
| |
|
virtual void | onPlaced (const BlockSetContext &context) const |
| |
|
bool | isAir () const |
| |
|
bool | isMultiblock () const |
| |
|
BlockID | getID () const |
| |
|
const Geometry * | geometry () const |
| |
|
bool | isSolid () const |
| |
|
bool | isVoxel () const |
| |
|
bool | facingUp () const |
| |
|
Layer | layer () const |
| |
|
RotationMode | rotationMode () const |
| |
|
Block & | rotationMode (RotationMode mode) |
| |
|
Block & | isSolid (bool solid) |
| |
|
Block & | isVoxel (bool voxel) |
| |
| Block & | facingUp (bool state) |
| |
|
Block & | material (const BlockMaterial &mat) |
| |
|
const BlockMaterial & | material () const |
| |
|
|
static Block & | air () |
| |
|
static Block & | multiblock () |
| |
|
| static constexpr BlockID | AirID = 0 |
| | Reserved block ID range: 0-8 (inclusive).
|
| |
|
static constexpr BlockID | MultiblockID = 1 |
| |
|
|
bool | m_isSolid |
| |
|
bool | m_isVoxel |
| |
|
bool | m_faceUp = false |
| |
|
Layer | m_layer |
| |
|
RotationMode | m_rotationMode = RotationMode::None |
| |
|
const Geometry * | m_geometry |
| |
|
BlockMaterial | m_material |
| |
◆ facingUp()
| Block & Block::facingUp |
( |
bool |
state | ) |
|
- Note
- Denotes the base orientation of the block model and texture. Blocks have to be modeled so the base orientation is either up or north.
◆ AirID
| constexpr BlockID engine::Block::AirID = 0 |
|
staticconstexpr |
Reserved block ID range: 0-8 (inclusive).
- Note
- Block IDs 0-8 are reserved for engine use: 0: Air 1: Multiblock 2-8: (reserved for future/engine use; see Engine.cpp lines 34-40)
The documentation for this class was generated from the following files:
- src/block/Block.h
- src/block/Block.cpp