66 virtual void Tick (std::chrono::milliseconds a_Dt,
cChunk & a_Chunk)
override eType
All types of entity effects (numbers correspond to protocol / storage types)
void SetEntityEffect(cEntityEffect a_EntityEffect)
cEntityEffect::eType m_EntityEffectType
void Splash(Vector3d a_HitPos)
Splashes the potion, fires its particle effects and sounds.
int m_DestroyTimer
Time in ticks to wait for the hit animation to begin before destroying.
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
virtual void Destroy(bool a_ShouldBroadcast=true)
Destroys the entity and schedules it for memory freeing; if a_ShouldBroadcast is set to true...
cEntityEffect m_EntityEffect
void SetPotionColor(int a_PotionColor)
virtual void OnHitEntity(cEntity &a_EntityHit, Vector3d a_HitPos) override
Called by the physics blocktracer when the entity hits another entity.
cEntityEffect GetEntityEffect(void) const
const cItem & GetItem(void) const
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc...
int GetPotionColor(void) const
#define CLASS_PROTODEF(classname)
cEntityEffect::eType GetEntityEffectType(void) const
virtual void SpawnOn(cClientHandle &a_Client) override
Descendants override this function to send a command to the specified client to spawn the entity on t...
cProjectileEntity(eKind a_Kind, cEntity *a_Creator, Vector3d a_Pos, double a_Width, double a_Height)
virtual void OnHitSolidBlock(Vector3d a_HitPos, eBlockFace a_HitFace) override
Called by the physics blocktracer when the entity hits a solid block, the hit position and the face h...
void SetEntityEffectType(cEntityEffect::eType a_EntityEffectType)