43 virtual void Tick(std::chrono::milliseconds a_Dt,
cChunk & a_Chunk)
override;
virtual void KilledBy(TakeDamageInfo &a_TDI) override
Called when the health drops below zero.
virtual void GetDrops(cItems &a_Items, cEntity *a_Killer) override
Returns the list of drops for this pawn when it is killed.
cHangingEntity(eEntityType a_EntityType, eBlockFace a_BlockFace, Vector3d a_Pos)
void TiePlayersLeashedMobs(cPlayer &a_Player, bool a_ShouldBroadCast)
Looks for mobs leashed to a player and ties them to this knot.
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
bool m_ShouldSelfDestroy
When a fence is destroyed, the knot on it gets destroyed after a while.
static cLeashKnot * FindKnotAtPos(cWorldInterface &a_WorldInterface, Vector3i a_BlockPos)
Returns the leash knot entity representing the knot at the specified position.
virtual void OnRightClicked(cPlayer &a_Player) override
Called when the specified player right-clicks this entity.
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...
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc...
#define CLASS_PROTODEF(classname)
void SetShouldSelfDestroy()
This class bridges a vector of cItem for safe access via Lua.