From d2e92440eb3c4b3b9af42451d6a7406d384307b6 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Fri, 28 Aug 2020 21:43:12 +0100 Subject: Remove redundant DoWithChunkAt in chests --- src/BlockEntities/BlockEntityWithItems.cpp | 9 +++------ src/BlockEntities/ChestEntity.cpp | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'src/BlockEntities') diff --git a/src/BlockEntities/BlockEntityWithItems.cpp b/src/BlockEntities/BlockEntityWithItems.cpp index 54b67717c..9821bd539 100644 --- a/src/BlockEntities/BlockEntityWithItems.cpp +++ b/src/BlockEntities/BlockEntityWithItems.cpp @@ -53,10 +53,7 @@ void cBlockEntityWithItems::OnSlotChanged(cItemGrid * a_Grid, int a_SlotNum) } m_World->MarkChunkDirty(GetChunkX(), GetChunkZ()); - m_World->DoWithChunkAt(m_Pos, [&](cChunk & a_Chunk) - { - // Notify comparators: - m_World->WakeUpSimulators(m_Pos); - return true; - }); + + // Notify comparators: + m_World->WakeUpSimulators(m_Pos); } diff --git a/src/BlockEntities/ChestEntity.cpp b/src/BlockEntities/ChestEntity.cpp index 5f99da454..0f005fb53 100644 --- a/src/BlockEntities/ChestEntity.cpp +++ b/src/BlockEntities/ChestEntity.cpp @@ -243,10 +243,7 @@ void cChestEntity::OnSlotChanged(cItemGrid * a_Grid, int a_SlotNum) } m_World->MarkChunkDirty(GetChunkX(), GetChunkZ()); - m_World->DoWithChunkAt(m_Pos, [&](cChunk & a_Chunk) - { - // Notify comparators: - m_World->WakeUpSimulators(m_Pos); - return true; - }); + + // Notify comparators: + m_World->WakeUpSimulators(m_Pos); } -- cgit v1.2.3