49 virtual void Tick(std::chrono::milliseconds a_Dt,
cChunk & a_Chunk)
override;
55 switch (a_ProtocolFace)
63 LOGINFO(
"Invalid facing (%d) in a cHangingEntity, adjusting to BLOCK_FACE_XP.", a_ProtocolFace);
64 ASSERT(!
"Tried to convert a bad facing!");
unsigned char BLOCKTYPE
The datatype used by blockdata.
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc.
#define CLASS_PROTODEF(classname)
void LOGINFO(std::string_view a_Format, const Args &... args)
cEntity(eEntityType a_EntityType, Vector3d a_Pos, float a_Width, float a_Height)
static eBlockFace ProtocolFaceToBlockFace(Byte a_ProtocolFace)
Converts protocol hanging item facing to eBlockFace values.
void SetFacing(eBlockFace a_Facing)
Set the direction in which the entity is facing.
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.
void SetProtocolFacing(Byte a_Facing)
Set 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)
static Byte BlockFaceToProtocolFace(eBlockFace a_BlockFace)
Converts eBlockFace values to protocol hanging item faces.
eBlockFace GetFacing() const
Returns the direction in which the entity is facing.