5 #include "../Entities/Player.h" 12 super(
"Mooshroom",
mtMooshroom,
"entity.cow.hurt",
"entity.cow.death", 0.9, 1.3)
27 unsigned int LootingLevel = 0;
28 if (a_Killer !=
nullptr)
double GetPosY(void) const
virtual UInt32 SpawnMob(double a_PosX, double a_PosY, double a_PosZ, eMonsterType a_MonsterType, bool a_Baby=false) override
Spawns a mob of the specified type.
double GetPosX(void) const
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.
void SpawnItemPickups(const cItems &a_Pickups, Vector3i a_BlockPos, double a_FlyAwaySpeed=1.0, bool a_IsPlayerCreated=false)
Spawns item pickups for each item in the list.
cEnchantments m_Enchantments
int AddItem(const cItem &a_ItemStack, bool a_AllowNewStacks=true)
Adds as many items out of a_ItemStack as can fit.
virtual void Destroy(bool a_ShouldBroadcast=true) override
Destroys the entity and schedules it for memory freeing; if a_ShouldBroadcast is set to true...
virtual void GetDrops(cItems &a_Drops, cEntity *a_Killer=nullptr) override
Returns the list of drops for this pawn when it is killed.
void UseEquippedItem(short a_Damage=1)
Damage the player's equipped item by a_Damage, possibly less if the equipped item is enchanted...
virtual cItem GetEquippedWeapon(void) const
Returns the curently equipped weapon; empty item if none.
double GetPosZ(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)
virtual void OnRightClicked(cPlayer &a_Player) override
Called when the specified player right-clicks this entity.
This class bridges a vector of cItem for safe access via Lua.