|
Cuberite
A lightweight, fast and extensible game server for Minecraft
|
Go to the documentation of this file.
7 #include "../Entities/Player.h"
8 #include "../LineBlockTracer.h"
15 Super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_SoundAmbient, a_Width, a_Height)
99 double KnockbackAmount = 9;
void TakeDamage(cEntity &a_Attacker)
Makes this pawn take damage from an attack by a_Attacker.
int m_AttackCoolDownTicksLeft
virtual void CheckEventLostPlayer(std::chrono::milliseconds a_Dt)
cWorld * GetWorld(void) const
bool TargetIsInRange(void)
Returns whether or not the target is close enough for attack.
cPawn * GetTarget()
Returns the current target.
enum cMonster::MPersonality m_EMPersonality
virtual bool Attack(std::chrono::milliseconds a_Dt)
Try to perform attack returns true if attack was deemed successful (hit player, fired projectile,...
float GetHeight(void) const
void ResetAttackCooldown()
eMonsterType
Identifies individual monster type.
float GetHealth(void) const
Returns the health of this entity.
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
virtual bool IsNetherNative(void)
Returns whether this mob spawns in the Nether in Vanilla.
virtual void CheckEventSeePlayer(cChunk &a_Chunk)
virtual void InStateChasing(std::chrono::milliseconds a_Dt, cChunk &a_Chunk)
virtual void EventSeePlayer(cPlayer *a_Player, cChunk &a_Chunk) override
bool IsTicking(void) const
Returns true if the entity is valid and ticking.
virtual void EventSeePlayer(cPlayer *a_Player, cChunk &a_Chunk)
enum cMonster::MState m_EMState
const Vector3d & GetPosition(void) const
Exported in ManualBindings.
static bool LineOfSightTrace(cWorld &a_World, const Vector3d &a_Start, const Vector3d &a_End, int a_Sight)
Returns true if the two positions are within line of sight (not obscured by blocks).
virtual void InStateChasing(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
cAggressiveMonster(const AString &a_ConfigName, eMonsterType a_MobType, const AString &a_SoundHurt, const AString &a_SoundDeath, const AString &a_SoundAmbient, float a_Width, float a_Height)
virtual void MoveToPosition(const Vector3d &a_Position)
Engage pathfinder and tell it to calculate a path to a given position, and move the mob accordingly.