diff options
Diffstat (limited to '')
-rw-r--r-- | src/BlockEntities/BlockEntityWithItems.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/BlockEntities/BlockEntityWithItems.cpp b/src/BlockEntities/BlockEntityWithItems.cpp index 01d217a16..924882820 100644 --- a/src/BlockEntities/BlockEntityWithItems.cpp +++ b/src/BlockEntities/BlockEntityWithItems.cpp @@ -8,6 +8,7 @@ #include "Globals.h" #include "BlockEntityWithItems.h" +#include "../Simulator/RedstoneSimulator.h" @@ -68,5 +69,12 @@ void cBlockEntityWithItems::OnSlotChanged(cItemGrid * a_Grid, int a_SlotNum) } m_World->MarkChunkDirty(GetChunkX(), GetChunkZ()); + auto Pos = Vector3i(m_PosX, m_PosY, m_PosZ); + m_World->DoWithChunkAt(Pos, [&](cChunk & a_Chunk) + { + m_World->GetRedstoneSimulator()->WakeUp(Pos, &a_Chunk); + return true; + } + ); } } |