9 #include "../Entities/Player.h"
10 #include "../ClientHandle.h"
17 Super(a_BlockType, a_BlockMeta, a_Pos, a_World),
62 for (
auto & Node : Properties)
64 if (Node.get(
"name",
"").asString() ==
"textures")
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
unsigned char BLOCKTYPE
The datatype used by blockdata.
Utilities to allow casting a cWorld to one of its interfaces without including World....
BLOCKTYPE m_BlockType
The blocktype representing this particular instance in the world.
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.
AString m_OwnerTextureSignature
void SetRotation(eMobHeadRotation a_Rotation)
Set the rotation of the mob head.
eMobHeadRotation m_Rotation
cMobHeadEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld *a_World)
Creates a new mob head entity at the specified block coords.
virtual cItems ConvertToPickups() const override
Returns the contents of this block entity that it would drop if broken.
virtual void CopyFrom(const cBlockEntity &a_Src) override
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 SetOwner(const cPlayer &a_Owner)
Set the player for mob heads with player type.
void SetType(const eMobHeadType &a_SkullType)
Set the type of the mob head.
virtual void SendTo(cClientHandle &a_Client) override
Sends the packet defining the block entity to the client specified.
void SendBlockChange(Vector3i a_BlockPos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
cPlayer * GetPlayer(void)
void SendUpdateBlockEntity(cBlockEntity &a_BlockEntity)
const Json::Value & GetProperties(void) const
cWorld * GetWorld(void) const
cClientHandle * GetClientHandle(void) const
const AString & GetName(void) const
const cUUID & GetUUID(void) const
Returns the UUID that has been read from the client, or nil if not available.
This class bridges a vector of cItem for safe access via Lua.