From 748b121703fa28b10933f4432c09391e66179118 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 28 Mar 2021 14:40:57 +0100 Subject: Unify DoWithBlockEntity (#5168) + DoWith calls now broadcast the block entity and mark the chunk dirty + Add block entity change queue to synchronise BE updates with block updates * Fixed a few incorrect assertions about BE type - Remove manual overloads --- src/BlockEntities/BedEntity.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/BlockEntities/BedEntity.cpp') diff --git a/src/BlockEntities/BedEntity.cpp b/src/BlockEntities/BedEntity.cpp index 3d7005b12..7f5f90639 100644 --- a/src/BlockEntities/BedEntity.cpp +++ b/src/BlockEntities/BedEntity.cpp @@ -56,12 +56,4 @@ void cBedEntity::SendTo(cClientHandle & a_Client) void cBedEntity::SetColor(short a_Color) { m_Color = a_Color; - auto Pos = GetPos(); - - // If the bed entity is send immediately, the client (maybe) still has not the bed. - // Fix that by delaying the broadcast of the bed entity by a tick: - m_World->ScheduleTask(1, [Pos](cWorld & a_World) - { - a_World.BroadcastBlockEntity(Pos); - }); } -- cgit v1.2.3