101 LOGD(
"%s: Requesting creation of an unknown block entity - block type %d (%s)",
104 ASSERT(!
"Requesting creation of an unknown block entity");
118 return res.release();
NIBBLETYPE m_BlockMeta
The block meta representing this particular instance in the world Mainly used for directional entitie...
unsigned char BLOCKTYPE
The datatype used by blockdata.
BLOCKTYPE m_BlockType
The blocktype representing this particular instance in the world.
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
cBlockEntity * Clone(Vector3i a_Pos)
Makes an exact copy of this block entity, except for its m_World (set to nullptr), and at a new position.
Vector3i m_Pos
Position in absolute block coordinates.
virtual void CopyFrom(const cBlockEntity &a_Src)
Copies all properties of a_Src into this entity, except for its m_World and location.
void SetPos(Vector3i a_NewPos)
Updates the internally stored position.
AString ItemTypeToString(short a_ItemType)
Translates itemtype into a string.
static bool IsBlockEntityBlockType(BLOCKTYPE a_BlockType)
Returns true if the specified blocktype is supposed to have an associated block entity.
static cBlockEntity * CreateByBlockType(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld *a_World=nullptr)
Creates a new block entity for the specified block type at the specified absolute pos...