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/Items/ItemBanner.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Items/ItemBanner.h') diff --git a/src/Items/ItemBanner.h b/src/Items/ItemBanner.h index 7b9e6d05b..3f082c5a5 100644 --- a/src/Items/ItemBanner.h +++ b/src/Items/ItemBanner.h @@ -203,13 +203,15 @@ public: } const auto BannerPos = AddFaceDirection(a_ClickedBlockPos, a_ClickedBlockFace); - return a_World.DoWithBlockEntityAt(BannerPos.x, BannerPos.y, BannerPos.z, [Color](cBlockEntity & a_BlockEntity) + a_World.DoWithBlockEntityAt(BannerPos, [Color](cBlockEntity & a_BlockEntity) { ASSERT((a_BlockEntity.GetBlockType() == E_BLOCK_STANDING_BANNER) || (a_BlockEntity.GetBlockType() == E_BLOCK_WALL_BANNER)); auto & Banner = static_cast(a_BlockEntity); Banner.SetBaseColor(Color); - return true; + return false; }); + + return true; } }; -- cgit v1.2.3