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