diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-02-28 15:29:50 +0100 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-02-28 15:29:50 +0100 |
commit | 27b98dec2b62a1fe88130c6a5c2c840dde293a5e (patch) | |
tree | 6c92a2e4f8614e74362d2695961a9ffba8d08965 /src/BlockEntities/JukeboxEntity.h | |
parent | Fix Double Slabs, fix Slab Meta and add more things to burnable (diff) | |
parent | Merge pull request #709 from Howaner/GlobalFixes (diff) | |
download | cuberite-27b98dec2b62a1fe88130c6a5c2c840dde293a5e.tar cuberite-27b98dec2b62a1fe88130c6a5c2c840dde293a5e.tar.gz cuberite-27b98dec2b62a1fe88130c6a5c2c840dde293a5e.tar.bz2 cuberite-27b98dec2b62a1fe88130c6a5c2c840dde293a5e.tar.lz cuberite-27b98dec2b62a1fe88130c6a5c2c840dde293a5e.tar.xz cuberite-27b98dec2b62a1fe88130c6a5c2c840dde293a5e.tar.zst cuberite-27b98dec2b62a1fe88130c6a5c2c840dde293a5e.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 |