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/Blocks/BlockEnchantingTable.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Blocks/BlockEnchantingTable.h') diff --git a/src/Blocks/BlockEnchantingTable.h b/src/Blocks/BlockEnchantingTable.h index c921d8f27..33d7092e3 100644 --- a/src/Blocks/BlockEnchantingTable.h +++ b/src/Blocks/BlockEnchantingTable.h @@ -32,7 +32,7 @@ private: ) const override { AString WindowName = "Enchant"; - a_WorldInterface.DoWithBlockEntityAt(a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, [&WindowName](cBlockEntity & a_Entity) + a_WorldInterface.DoWithBlockEntityAt(a_BlockPos, [&WindowName](cBlockEntity & a_Entity) { if (a_Entity.GetBlockType() != E_BLOCK_ENCHANTMENT_TABLE) { @@ -46,7 +46,7 @@ private: WindowName = CustomName; } - return true; + return false; }); cWindow * Window = new cEnchantingWindow(a_BlockPos, std::move(WindowName)); -- cgit v1.2.3