6 #include "../Entities/FireChargeEntity.h" 12 super(
"Blaze",
mtBlaze,
"entity.blaze.hurt",
"entity.blaze.death", 0.6, 1.8)
24 if ((a_Killer !=
nullptr) && (a_Killer->
IsPlayer() || a_Killer->
IsA(
"cWolf")))
41 Speed.
y = Speed.
y + 1;
43 auto FireCharge = cpp14::make_unique<cFireChargeEntity>(
this,
GetPosition().
addedY(1), Speed);
44 auto FireChargePtr = FireCharge.get();
45 if (!FireChargePtr->Initialize(std::move(FireCharge), *
m_World))
cPawn * GetTarget()
Returns the current target.
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.
Vector3< T > addedY(T a_AddY) const
Returns a copy of this vector moved by the specified amount on the y axis.
cEnchantments m_Enchantments
Vector3d GetLookVector(void) const
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...
int m_AttackCoolDownTicksLeft
void SetGravity(float a_Gravity)
bool IsPlayer(void) const
void ResetAttackCooldown()
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 cItem GetEquippedWeapon(void) const
Returns the curently equipped weapon; empty item if none.
const Vector3d & GetPosition(void) const
Exported in ManualBindings.
void SetAirDrag(float a_AirDrag)
virtual void GetDrops(cItems &a_Drops, cEntity *a_Killer=nullptr) override
Returns the list of drops for this pawn when it is killed.
This class bridges a vector of cItem for safe access via Lua.