diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-09-02 12:35:22 +0200 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-09-02 12:35:22 +0200 |
commit | 07a5bf0984559d04fce1091b82b0952217ac64cc (patch) | |
tree | 0d1eee372a782213c9e2b84deaefe717b379a04b /src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h | |
parent | Skeletons (diff) | |
parent | Revert "Replace ItemCallbacks with lambdas (#3948)" (diff) | |
download | cuberite-07a5bf0984559d04fce1091b82b0952217ac64cc.tar cuberite-07a5bf0984559d04fce1091b82b0952217ac64cc.tar.gz cuberite-07a5bf0984559d04fce1091b82b0952217ac64cc.tar.bz2 cuberite-07a5bf0984559d04fce1091b82b0952217ac64cc.tar.lz cuberite-07a5bf0984559d04fce1091b82b0952217ac64cc.tar.xz cuberite-07a5bf0984559d04fce1091b82b0952217ac64cc.tar.zst cuberite-07a5bf0984559d04fce1091b82b0952217ac64cc.zip |
Diffstat (limited to 'src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h')
-rw-r--r-- | src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h b/src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h index 4974324a0..62b37eb1d 100644 --- a/src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h +++ b/src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h @@ -56,12 +56,18 @@ public: bool WasPoweredPreviously = IsActivated(a_Meta); if (IsPoweredNow && !WasPoweredPreviously) { - a_World.DoWithDropSpenserAt(a_Position.x, a_Position.y, a_Position.z, [](cDropSpenserEntity & a_DropSpenser) + class cSetPowerToDropSpenser : + public cDropSpenserCallback + { + public: + virtual bool Item(cDropSpenserEntity * a_DropSpenser) override { - a_DropSpenser.Activate(); + a_DropSpenser->Activate(); return false; } - ); + } DrSpSP; + + a_World.DoWithDropSpenserAt(a_Position.x, a_Position.y, a_Position.z, DrSpSP); } // Update the internal dropspenser state if necessary |