5 #include "../Entities/Player.h" 12 super(
"Cow",
mtCow,
"entity.cow.hurt",
"entity.cow.death", 0.9, 1.3)
27 unsigned int LootingLevel = 0;
28 if (a_Killer !=
nullptr)
bool RemoveOneEquippedItem(void)
Removes one item out of the currently equipped item stack, returns true if successful, false if empty-handed.
const cItem & GetEquippedItem(void) const
virtual bool IsOnFire(void) const
void AddRandomDropItem(cItems &a_Drops, unsigned int a_Min, unsigned int a_Max, short a_Item, short a_ItemHealth=0)
Adds a random number of a_Item between a_Min and a_Max to itemdrops a_Drops.
unsigned int GetLevel(int a_EnchantmentID) const
Returns the level for the specified enchantment; 0 if not stored.
cEnchantments m_Enchantments
virtual void GetDrops(cItems &a_Drops, cEntity *a_Killer=nullptr) override
Returns the list of drops for this pawn when it is killed.
int AddItem(const cItem &a_ItemStack, bool a_AllowNewStacks=true)
Adds as many items out of a_ItemStack as can fit.
virtual cItem GetEquippedWeapon(void) const
Returns the curently equipped weapon; empty item if none.
virtual void OnRightClicked(cPlayer &a_Player) override
Called when the specified player right-clicks this entity.
bool IsGameModeCreative(void) const
Returns true if the player is in Creative mode, either explicitly, or by inheriting from current worl...
virtual void OnRightClicked(cPlayer &a_Player) override
Called when the specified player right-clicks this entity.
cInventory & GetInventory(void)
This class bridges a vector of cItem for safe access via Lua.