summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/JukeboxEntity.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-09-23 17:06:27 +0200
committerAlexander Harkness <me@bearbin.net>2020-09-25 11:07:01 +0200
commitc53a0ba5f6f71da384a45a07685f8e25c3f91a29 (patch)
treebc8d016d1f5c5b5206b3b4f5580295bd91bb6099 /src/BlockEntities/JukeboxEntity.cpp
parentSmall cleanup in Jukeboxes (diff)
downloadcuberite-c53a0ba5f6f71da384a45a07685f8e25c3f91a29.tar
cuberite-c53a0ba5f6f71da384a45a07685f8e25c3f91a29.tar.gz
cuberite-c53a0ba5f6f71da384a45a07685f8e25c3f91a29.tar.bz2
cuberite-c53a0ba5f6f71da384a45a07685f8e25c3f91a29.tar.lz
cuberite-c53a0ba5f6f71da384a45a07685f8e25c3f91a29.tar.xz
cuberite-c53a0ba5f6f71da384a45a07685f8e25c3f91a29.tar.zst
cuberite-c53a0ba5f6f71da384a45a07685f8e25c3f91a29.zip
Diffstat (limited to 'src/BlockEntities/JukeboxEntity.cpp')
-rw-r--r--src/BlockEntities/JukeboxEntity.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/BlockEntities/JukeboxEntity.cpp b/src/BlockEntities/JukeboxEntity.cpp
index f5380e789..11d50b19a 100644
--- a/src/BlockEntities/JukeboxEntity.cpp
+++ b/src/BlockEntities/JukeboxEntity.cpp
@@ -40,7 +40,16 @@ cJukeboxEntity::~cJukeboxEntity()
void cJukeboxEntity::Destroy(void)
{
ASSERT(m_World != nullptr);
- EjectRecord();
+ m_World->BroadcastSoundParticleEffect(EffectID::SFX_RANDOM_PLAY_MUSIC_DISC, GetPos(), 0);
+}
+
+
+
+
+
+cItems cJukeboxEntity::ConvertToPickups() const
+{
+ return IsPlayingRecord() ? cItem(static_cast<short>(m_Record)) : cItems();
}