summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockNoteBlock.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-03-28 15:40:57 +0200
committerGitHub <noreply@github.com>2021-03-28 15:40:57 +0200
commit748b121703fa28b10933f4432c09391e66179118 (patch)
tree58a39b6a75c3e9127507bf3c185a99e546147276 /src/Blocks/BlockNoteBlock.h
parentFix Windows XP to 7 compatibility (#5167) (diff)
downloadcuberite-748b121703fa28b10933f4432c09391e66179118.tar
cuberite-748b121703fa28b10933f4432c09391e66179118.tar.gz
cuberite-748b121703fa28b10933f4432c09391e66179118.tar.bz2
cuberite-748b121703fa28b10933f4432c09391e66179118.tar.lz
cuberite-748b121703fa28b10933f4432c09391e66179118.tar.xz
cuberite-748b121703fa28b10933f4432c09391e66179118.tar.zst
cuberite-748b121703fa28b10933f4432c09391e66179118.zip
Diffstat (limited to 'src/Blocks/BlockNoteBlock.h')
-rw-r--r--src/Blocks/BlockNoteBlock.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/Blocks/BlockNoteBlock.h b/src/Blocks/BlockNoteBlock.h
index ac1ab7238..566b9bef5 100644
--- a/src/Blocks/BlockNoteBlock.h
+++ b/src/Blocks/BlockNoteBlock.h
@@ -26,18 +26,15 @@ private:
const Vector3i a_BlockPos
) const override
{
- a_WorldInterface.DoWithBlockEntityAt(a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, [](cBlockEntity & a_BlockEntity)
+ a_WorldInterface.DoWithBlockEntityAt(a_BlockPos, [](cBlockEntity & a_BlockEntity)
{
if (a_BlockEntity.GetBlockType() != E_BLOCK_NOTE_BLOCK)
{
return false;
}
- auto & NoteEntity = static_cast<cNoteEntity &>(a_BlockEntity);
-
- NoteEntity.MakeSound();
-
- return true;
+ static_cast<cNoteEntity &>(a_BlockEntity).MakeSound();
+ return false;
});
}
};