6 #include "../Entities/FireChargeEntity.h"
12 Super(
"Blaze",
mtBlaze,
"entity.blaze.hurt",
"entity.blaze.death",
"entity.blaze.ambient", 0.6f, 1.8f),
40 if ((a_Killer !=
nullptr) && (a_Killer->
IsPlayer() || a_Killer->
IsA(
"cWolf")))
70 Speed.
y = Speed.
y + 1;
unsigned int GetLevel(int a_EnchantmentID) const
Returns the level for the specified enchantment; 0 if not stored.
bool IsPlayer(void) const
bool IsTicking(void) const
Returns true if the entity is valid and ticking.
void SetGravity(float a_Gravity)
virtual bool IsA(const char *a_ClassName) const
Returns true if the entity is of the specified class or a subclass (cPawn's IsA("cEntity") returns tr...
void SetAirDrag(float a_AirDrag)
virtual cItem GetEquippedWeapon(void) const
Returns the curently equipped weapon; empty item if none.
const Vector3d & GetPosition(void) const
Exported in ManualBindings.
Vector3d GetLookVector(void) const
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 bool Attack(std::chrono::milliseconds a_Dt) override
Try to perform attack returns true if attack was deemed successful (hit player, fired projectile,...
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
int m_ChargeTimer
Number of ticks since the blaze started charging.
bool m_IsCharging
Specifies whether or not the blaze has started shooting fireballs.
virtual void GetDrops(cItems &a_Drops, cEntity *a_Killer=nullptr) override
Returns the list of drops for this pawn when it is killed.
void ResetAttackCooldown()
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.
cPawn * GetTarget()
Returns the current target.
int m_AttackCoolDownTicksLeft
virtual void BroadcastSoundEffect(const AString &a_SoundName, Vector3d a_Position, float a_Volume, float a_Pitch, const cClientHandle *a_Exclude=nullptr) override