diff options
author | Mattes D <github@xoft.cz> | 2014-02-28 14:28:50 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-02-28 14:28:50 +0100 |
commit | 6ad4b78a7ba00be58583b055f7d7227be465ec26 (patch) | |
tree | 1e5cc61a97bff757482193eb2ee50bb395bda5ec /src/BlockEntities/JukeboxEntity.h | |
parent | Added a MobDebug enabler script. (diff) | |
parent | Better Jukebox API (diff) | |
download | cuberite-6ad4b78a7ba00be58583b055f7d7227be465ec26.tar cuberite-6ad4b78a7ba00be58583b055f7d7227be465ec26.tar.gz cuberite-6ad4b78a7ba00be58583b055f7d7227be465ec26.tar.bz2 cuberite-6ad4b78a7ba00be58583b055f7d7227be465ec26.tar.lz cuberite-6ad4b78a7ba00be58583b055f7d7227be465ec26.tar.xz cuberite-6ad4b78a7ba00be58583b055f7d7227be465ec26.tar.zst cuberite-6ad4b78a7ba00be58583b055f7d7227be465ec26.zip |
Diffstat (limited to 'src/BlockEntities/JukeboxEntity.h')
-rw-r--r-- | src/BlockEntities/JukeboxEntity.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/BlockEntities/JukeboxEntity.h b/src/BlockEntities/JukeboxEntity.h index 734d7bb66..01ce52494 100644 --- a/src/BlockEntities/JukeboxEntity.h +++ b/src/BlockEntities/JukeboxEntity.h @@ -37,10 +37,20 @@ public: int GetRecord(void); void SetRecord(int a_Record); - void PlayRecord(void); - /// Ejects the currently held record as a pickup. Does nothing when no record inserted. - void EjectRecord(void); + /** Play a Record. Return false, when a_Record isn't a Record */ + bool PlayRecord(int a_Record); + + /** Ejects the currently held record as a pickup. Return false when no record inserted. */ + bool EjectRecord(void); + + /** Is in the Jukebox a Record? */ + bool IsPlayingRecord(void); + + static bool IsRecordItem(int a_Item) + { + return ((a_Item >= E_ITEM_FIRST_DISC) && (a_Item <= E_ITEM_LAST_DISC)); + } // tolua_end |