9 #include "../Entities/Player.h" 10 #include "../ClientHandle.h" 17 super(a_BlockType, a_BlockMeta, a_Pos, a_World),
90 for (
auto & Node : Properties)
92 if (Node.get(
"name",
"").asString() ==
"textures")
cMobHeadEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld *a_World)
Creates a new mob head entity at the specified block coords.
void SetOwner(const cPlayer &a_Owner)
Set the player for mob heads with player type.
const Json::Value & GetProperties(void) const
unsigned char BLOCKTYPE
The datatype used by blockdata.
BLOCKTYPE m_BlockType
The blocktype representing this particular instance in the world.
void SetType(const eMobHeadType &a_SkullType)
Set the type of the mob head.
const AString & GetName(void) const
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
void SetRotation(eMobHeadRotation a_Rotation)
Set the rotation of the mob head.
NIBBLETYPE GetBlockMeta(Vector3i a_BlockPos)
Returns the block meta at the specified position.
Utilities to allow casting a cWorld to one of its interfaces without including World.h.
virtual void BroadcastBlockEntity(Vector3i a_BlockPos, const cClientHandle *a_Exclude=nullptr) override
If there is a block entity at the specified coods, sends it to all clients except a_Exclude...
virtual void SendTo(cClientHandle &a_Client) override
Sends the packet defining the block entity to the client specified.
cPlayer * GetPlayer(void)
void SendBlockChange(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
void SendUpdateBlockEntity(cBlockEntity &a_BlockEntity)
Vector3i m_Pos
Position in absolute block coordinates.
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 void CopyFrom(const cBlockEntity &a_Src)
Copies all properties of a_Src into this entity, except for its m_World and location.
const cUUID & GetUUID(void) const
Returns the UUID that has been read from the client, or nil if not available.
virtual bool UsedBy(cPlayer *a_Player) override
Called when a player uses this entity; should open the UI window.
AString m_OwnerTextureSignature
eMobHeadRotation m_Rotation
cWorld * GetWorld(void) const
cClientHandle * GetClientHandle(void) const
Returns the raw client handle associated with the player.