6 #include "../ClientHandle.h"
14 Super(etItemFrame, a_BlockFace, a_Pos),
void AddFaceDirection(int &a_BlockX, int &a_BlockY, int &a_BlockZ, eBlockFace a_BlockFace, bool a_bInverse)
Modifies the specified coords so that they point to the block adjacent to the one specified through i...
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc.
void SendSpawnEntity(const cEntity &a_Entity)
void SendEntityMetadata(const cEntity &a_Entity)
void SendMapData(const cMap &a_Map, int a_DataStartX, int a_DataStartY)
bool IsPlayer(void) const
cChunk * GetParentChunk()
Returns the chunk responsible for ticking this entity.
void SetInvulnerableTicks(int a_InvulnerableTicks)
Set the invulnerable ticks from the entity.
virtual bool DoTakeDamage(TakeDamageInfo &a_TDI)
Makes this entity take damage specified in the a_TDI.
virtual void OnRightClicked(cPlayer &a_Player)
Called when the specified player right-clicks this entity.
const Vector3d & GetPosition(void) const
Exported in ManualBindings.
cWorld * GetWorld(void) const
static eBlockFace ProtocolFaceToBlockFace(Byte a_ProtocolFace)
Converts protocol hanging item facing to eBlockFace values.
virtual void SpawnOn(cClientHandle &a_ClientHandle) override
Descendants override this function to send a command to the specified client to spawn the entity on t...
cItemFrame(eBlockFace a_BlockFace, Vector3d a_Pos)
virtual void SpawnOn(cClientHandle &a_ClientHandle) override
Descendants override this function to send a command to the specified client to spawn the entity on t...
virtual void GetDrops(cItems &a_Items, cEntity *a_Killer) override
Returns the list of drops for this pawn when it is killed.
virtual bool DoTakeDamage(TakeDamageInfo &a_TDI) override
Makes this entity take damage specified in the a_TDI.
virtual void OnRightClicked(cPlayer &a_Player) override
Called when the specified player right-clicks this entity.
const cItem & GetEquippedItem(void) const
bool IsGameModeCreative(void) const
Returns true if the player is in Creative mode, either explicitly, or by inheriting from current worl...
cInventory & GetInventory(void)
bool RemoveOneEquippedItem(void)
Removes one item out of the currently equipped item stack, returns true if successful,...
bool IsEmpty(void) const
Returns true if the item represents an empty stack - either the type is invalid, or count is zero.
void Empty(void)
Empties the item and frees up any dynamic storage used by the internals.
This class bridges a vector of cItem for safe access via Lua.
Encapsulates an in-game world map.
cMap * GetMapData(unsigned int a_ID)
Returns the map with the specified ID, nullptr if out of range.
Vector3< T > addedY(T a_AddY) const
Returns a copy of this vector moved by the specified amount on the y axis.
UInt32 SpawnItemPickup(Vector3d a_Pos, const cItem &a_Item, Vector3f a_Speed, int a_LifetimeTicks=6000, bool a_CanCombine=true)
Spawns a single pickup containing the specified item.
virtual void BroadcastEntityMetadata(const cEntity &a_Entity, const cClientHandle *a_Exclude=nullptr) override
cMapManager & GetMapManager(void)
Returns the associated map manager instance.