11 Super(
"Chicken",
mtChicken,
"entity.chicken.hurt",
"entity.chicken.death",
"entity.chicken.ambient", 0.4f, 0.7f),
43 Drops.emplace_back(
E_ITEM_EGG,
static_cast<char>(1));
63 unsigned int LootingLevel = 0;
64 if (a_Killer !=
nullptr)
MTRand & GetRandomProvider()
Returns the current thread's random number source.
unsigned int GetLevel(int a_EnchantmentID) const
Returns the level for the specified enchantment; 0 if not stored.
bool IsTicking(void) const
Returns true if the entity is valid and ticking.
void SetGravity(float a_Gravity)
double GetPosX(void) const
double GetPosZ(void) const
virtual bool IsOnFire(void) const
double GetPosY(void) const
void SetAirDrag(float a_AirDrag)
virtual cItem GetEquippedWeapon(void) const
Returns the curently equipped weapon; empty item if none.
cEnchantments m_Enchantments
This class bridges a vector of cItem for safe access via Lua.
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
virtual void GetDrops(cItems &a_Drops, cEntity *a_Killer=nullptr) override
Returns the list of drops for this pawn when it is killed.
virtual bool DoTakeDamage(TakeDamageInfo &a_TDI) override
When hit by someone, run away.
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.
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
virtual bool DoTakeDamage(TakeDamageInfo &a_TDI) override
When hit by someone, run away.
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.