summaryrefslogtreecommitdiffstats
path: root/src/Simulator/IncrementalRedstoneSimulator/NoteBlockHandler.h
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2017-09-02 12:35:22 +0200
committerLogicParrot <LogicParrot@users.noreply.github.com>2017-09-02 12:35:22 +0200
commit07a5bf0984559d04fce1091b82b0952217ac64cc (patch)
tree0d1eee372a782213c9e2b84deaefe717b379a04b /src/Simulator/IncrementalRedstoneSimulator/NoteBlockHandler.h
parentSkeletons (diff)
parentRevert "Replace ItemCallbacks with lambdas (#3948)" (diff)
downloadcuberite-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/NoteBlockHandler.h')
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/NoteBlockHandler.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator/NoteBlockHandler.h b/src/Simulator/IncrementalRedstoneSimulator/NoteBlockHandler.h
index ba6c695d6..add608654 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/NoteBlockHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/NoteBlockHandler.h
@@ -45,12 +45,17 @@ public:
return {};
}
- a_World.DoWithNoteBlockAt(a_Position.x, a_Position.y, a_Position.z, [](cNoteEntity & a_NoteBlock)
+ class cSetPowerToNoteBlock : public cNoteBlockCallback
+ {
+ public:
+ virtual bool Item(cNoteEntity * a_NoteBlock) override
{
- a_NoteBlock.MakeSound();
+ a_NoteBlock->MakeSound();
return false;
}
- );
+ } NoteBlockSP;
+
+ a_World.DoWithNoteBlockAt(a_Position.x, a_Position.y, a_Position.z, NoteBlockSP);
return {};
}