summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/NoteEntity.h
diff options
context:
space:
mode:
author12xx12 <44411062+12xx12@users.noreply.github.com>2020-09-05 17:07:01 +0200
committerGitHub <noreply@github.com>2020-09-05 17:07:01 +0200
commit2d197e147e4ede9b2b38692a88f620e78feba437 (patch)
tree8b2e90e59898ef4c029d72a696b7bed71c5a2f25 /src/BlockEntities/NoteEntity.h
parentWriteConsoleInput can return FALSE when running as servic (diff)
downloadcuberite-2d197e147e4ede9b2b38692a88f620e78feba437.tar
cuberite-2d197e147e4ede9b2b38692a88f620e78feba437.tar.gz
cuberite-2d197e147e4ede9b2b38692a88f620e78feba437.tar.bz2
cuberite-2d197e147e4ede9b2b38692a88f620e78feba437.tar.lz
cuberite-2d197e147e4ede9b2b38692a88f620e78feba437.tar.xz
cuberite-2d197e147e4ede9b2b38692a88f620e78feba437.tar.zst
cuberite-2d197e147e4ede9b2b38692a88f620e78feba437.zip
Diffstat (limited to 'src/BlockEntities/NoteEntity.h')
-rw-r--r--src/BlockEntities/NoteEntity.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/BlockEntities/NoteEntity.h b/src/BlockEntities/NoteEntity.h
index 30dea8811..c5da3b44e 100644
--- a/src/BlockEntities/NoteEntity.h
+++ b/src/BlockEntities/NoteEntity.h
@@ -40,13 +40,12 @@ public: // tolua_export
/** Creates a new note entity. a_World may be nullptr */
cNoteEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World);
- virtual ~cNoteEntity() override {}
// tolua_begin
- char GetPitch(void);
- void SetPitch(char a_Pitch);
- void IncrementPitch(void);
+ unsigned char GetNote(void);
+ void SetNote(unsigned char a_Note);
+ void IncrementNote(void);
void MakeSound(void);
// tolua_end
@@ -56,10 +55,11 @@ public: // tolua_export
virtual bool UsedBy(cPlayer * a_Player) override;
virtual void SendTo(cClientHandle &) override {}
-private:
- char m_Pitch;
-} ; // tolua_export
-
-
+ /** Returns the relative pitch (used in the protocol)
+ from a note value between 0 and 24 (used in m_Note). */
+ static float PitchFromNote(unsigned char a_Note);
+private:
+ unsigned char m_Note;
+} ; // tolua_export