summaryrefslogtreecommitdiffstats
path: root/src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h')
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h b/src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h
index 309fa757a..4dd87e972 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h
@@ -46,9 +46,14 @@ namespace DropSpenserHandler
if (IsPoweredNow && !WasPoweredPreviously)
{
- a_Chunk.DoWithDropSpenserAt(a_Position, [](cDropSpenserEntity & a_DropSpenser)
+ a_Chunk.DoWithBlockEntityAt(a_Position, [](cBlockEntity & a_BlockEntity)
{
- a_DropSpenser.Activate();
+ if ((a_BlockEntity.GetBlockType() != E_BLOCK_DISPENSER) && (a_BlockEntity.GetBlockType() != E_BLOCK_DROPPER))
+ {
+ return false;
+ }
+
+ static_cast<cDropSpenserEntity &>(a_BlockEntity).Activate();
return false;
});
}