8 #include "../Entities/Player.h"
9 #include "../ClientHandle.h"
17 Super(a_BlockType, a_BlockMeta, a_Pos, a_World)
97 return (m_ItemData ==
static_cast<short>(2));
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
unsigned char BLOCKTYPE
The datatype used by blockdata.
virtual void CopyFrom(const cBlockEntity &a_Src)
Copies all properties of a_Src into this entity, except for its m_World and location.
virtual void SendTo(cClientHandle &a_Client) override
Sends the packet defining the block entity to the client specified.
bool IsItemInPot(void)
Is a flower in the pot?
virtual bool UsedBy(cPlayer *a_Player) override
Called when a player uses this entity; should open the UI window.
virtual void CopyFrom(const cBlockEntity &a_Src) override
Copies all properties of a_Src into this entity, except for its m_World and location.
cFlowerPotEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld *a_World)
Creates a new flowerpot entity at the specified block coords.
static bool IsFlower(short m_ItemType, short m_ItemData)
virtual cItems ConvertToPickups() const override
Returns the contents of this block entity that it would drop if broken.
void SendUpdateBlockEntity(cBlockEntity &a_BlockEntity)
cClientHandle * GetClientHandle(void) const
StatisticsManager & GetStatistics()
Return the associated statistic and achievement manager.
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,...
const cItem & GetEquippedItem(void) const
Returns current equiped item.
cItem CopyOne(void) const
Returns a copy of this item with m_ItemCount set to 1.
This class bridges a vector of cItem for safe access via Lua.
std::unordered_map< CustomStatistic, StatValue > Custom
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.