7 #include "json/value.h" 9 #include "../ClientHandle.h" 16 super(a_BlockType, a_BlockMeta, a_Pos, a_World)
29 auto & src =
static_cast<const cSignEntity &
>(a_Src);
66 LOGWARNING(
"%s: setting a non-existent line %d (value \"%s\"", __FUNCTION__, a_Index, a_Line.c_str());
80 LOGWARNING(
"%s: requesting a non-existent line %d", __FUNCTION__, a_Index);
virtual void SendTo(cClientHandle &a_Client) override
Sends the packet defining the block entity to the client specified.
unsigned char BLOCKTYPE
The datatype used by blockdata.
static bool IsValidHeight(int a_Height)
Validates a height-coordinate.
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
virtual void CopyFrom(const cBlockEntity &a_Src) override
Copies all properties of a_Src into this entity, except for its m_World and location.
AString GetLine(int a_Index) const
Retrieves individual line (zero-based index)
void SetLines(const AString &a_Line1, const AString &a_Line2, const AString &a_Line3, const AString &a_Line4)
Sets all the sign's lines.
cSignEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld *a_World)
Creates a new empty sign entity at the specified block coords and block type (wall or standing)...
void SendUpdateSign(int a_BlockX, int a_BlockY, int a_BlockZ, const AString &a_Line1, const AString &a_Line2, const AString &a_Line3, const AString &a_Line4)
void LOGWARNING(const char *a_Format, fmt::ArgList a_ArgList)
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.
virtual bool UsedBy(cPlayer *a_Player) override
Called when a player uses this entity; should open the UI window.
void SetLine(int a_Index, const AString &a_Line)
Sets individual line (zero-based index)
#define ARRAYCOUNT(X)
Evaluates to the number of elements in an array (compile-time!)