8 #include "../ClientHandle.h"
15 Super(a_EntityType, a_Pos, 0.5f, 0.5f),
@ E_BLOCK_REDSTONE_REPEATER_ON
@ E_BLOCK_REDSTONE_REPEATER_OFF
unsigned char BLOCKTYPE
The datatype used by blockdata.
void AddFaceDirection(int &a_BlockX, int &a_BlockY, int &a_BlockZ, eBlockFace a_BlockFace, bool a_bInverse)
Modifies the specified coords so that they point to the block adjacent to the one specified through i...
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc.
static bool IsSolid(BLOCKTYPE Block)
Is this block solid (player cannot walk through)?
bool UnboundedRelGetBlockType(Vector3i a_RelCoords, BLOCKTYPE &a_BlockType) const
Same as GetBlockType(), but relative coords needn't be in this chunk (uses m_Neighbor-s or m_ChunkMap...
static void AbsoluteToRelative(int &a_X, int &a_Y, int &a_Z, int &a_ChunkX, int &a_ChunkZ)
Converts absolute block coords into relative (chunk + block) coords:
void SetYaw(double a_Yaw)
float GetMaxHealth(void) const
void SetHealth(float a_Health)
Sets the health of this entity; doesn't broadcast any hurt animation.
void Destroy()
Destroys the entity, schedules it for memory freeing and broadcasts the DestroyEntity packet.
void TakeDamage(cEntity &a_Attacker)
Makes this pawn take damage from an attack by a_Attacker.
virtual void KilledBy(TakeDamageInfo &a_TDI)
Called when the health drops below zero.
void SetMaxHealth(float a_MaxHealth)
Sets the maximum value for the health.
const Vector3d & GetPosition(void) const
Exported in ManualBindings.
static eBlockFace ProtocolFaceToBlockFace(Byte a_ProtocolFace)
Converts protocol hanging item facing to eBlockFace values.
virtual void KilledBy(TakeDamageInfo &a_TDI) override
Called when the health drops below zero.
Byte GetProtocolFacing() const
Returns the direction in which the entity is facing.
virtual void SpawnOn(cClientHandle &a_ClientHandle) override
Descendants override this function to send a command to the specified client to spawn the entity on t...
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
static bool IsValidSupportBlock(BLOCKTYPE a_BlockType)
Returns if the given block can support hanging entity placements.
cHangingEntity(eEntityType a_EntityType, eBlockFace a_BlockFace, Vector3d a_Pos)
cTickTimeLong GetWorldTickAge() const