{"action":"created","issue":{"url":"https://api.github.com/repos/cuberite/cuberite/issues/3370","repository_url":"https://api.github.com/repos/cuberite/cuberite","labels_url":"https://api.github.com/repos/cuberite/cuberite/issues/3370/labels{/name}","comments_url":"https://api.github.com/repos/cuberite/cuberite/issues/3370/comments","events_url":"https://api.github.com/repos/cuberite/cuberite/issues/3370/events","html_url":"https://github.com/cuberite/cuberite/issues/3370","id":175132999,"number":3370,"title":"Jukeboxes don't play any music","user":{"login":"mhsjlw","id":8526903,"avatar_url":"https://avatars.githubusercontent.com/u/8526903?v=3","gravatar_id":"","url":"https://api.github.com/users/mhsjlw","html_url":"https://github.com/mhsjlw","followers_url":"https://api.github.com/users/mhsjlw/followers","following_url":"https://api.github.com/users/mhsjlw/following{/other_user}","gists_url":"https://api.github.com/users/mhsjlw/gists{/gist_id}","starred_url":"https://api.github.com/users/mhsjlw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhsjlw/subscriptions","organizations_url":"https://api.github.com/users/mhsjlw/orgs","repos_url":"https://api.github.com/users/mhsjlw/repos","events_url":"https://api.github.com/users/mhsjlw/events{/privacy}","received_events_url":"https://api.github.com/users/mhsjlw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-05T22:29:05Z","updated_at":"2016-09-06T00:48:35Z","closed_at":null,"body":"Client version: 1.10.(1,2), \r\nServer OS: Linux\r\nCommit id: f7029eddd4120f672c59a4b3a4395832f4de8863\r\n\r\nWhen placing a record into a Jukebox\r\n\r\n### Expected behavior\r\nTakes disk and plays the audio while showing the user the title bar of the song that is currently playing\r\n\r\n### Actual behavior\r\nTakes disk, doesn't play an audio\r\n\r\n### Steps to reproduce the behavior\r\nPlace a Jukebox, put a disk inside of it\r\n\r\nIn 1.9, `0x46` is sign update, but in 1.10 it is a sound packet. `0x19` is the named sound packet. `0x46` for 1.10 needs to be implemented then, check if the client is 1.8 or 1.9 and function as it currently does, but 1.10 needs to have a sound packet sent to the client after updating the block's meta and and the sound effect. Note that \r\n\r\n```cpp\r\nm_World->BroadcastSoundEffect(\"record_cat\", m_PosX, m_PosY, m_PosZ, 0.2, 0.5);\r\n```\r\n\r\ndoesn't actually play the \"record_cat\" disk as you'd think it would\r\n"},"comment":{"url":"https://api.github.com/repos/cuberite/cuberite/issues/comments/244826220","html_url":"https://github.com/cuberite/cuberite/issues/3370#issuecomment-244826220","issue_url":"https://api.github.com/repos/cuberite/cuberite/issues/3370","id":244826220,"user":{"login":"Pokechu22","id":8334194,"avatar_url":"https://avatars.githubusercontent.com/u/8334194?v=3","gravatar_id":"","url":"https://api.github.com/users/Pokechu22","html_url":"https://github.com/Pokechu22","followers_url":"https://api.github.com/users/Pokechu22/followers","following_url":"https://api.github.com/users/Pokechu22/following{/other_user}","gists_url":"https://api.github.com/users/Pokechu22/gists{/gist_id}","starred_url":"https://api.github.com/users/Pokechu22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pokechu22/subscriptions","organizations_url":"https://api.github.com/users/Pokechu22/orgs","repos_url":"https://api.github.com/users/Pokechu22/repos","events_url":"https://api.github.com/users/Pokechu22/events{/privacy}","received_events_url":"https://api.github.com/users/Pokechu22/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T00:48:35Z","updated_at":"2016-09-06T00:48:35Z","body":"Jukeboxes don't use the play sound packet; wrong IDs for that aren't the cause of the issue.  Instead, they use the [effect packet](http://wiki.vg/Protocol#Effect) (`BroadcastSoundParticleEffect`), which has hardcoded IDs.  Unfortunately cuberite's [enum for those IDs](https://github.com/cuberite/cuberite/blob/f7029eddd4120f672c59a4b3a4395832f4de8863/src/EffectID.h) has hardcoded values, and those values are no longer correct as of 1.9 - for instance, play record is 1010, not 1005.  Since the wrong IDs are used, nothing with the effect packet will actually work correctly (eg, during 1.9 development hard fall particles would play the end crystal explosion sound, for instance, although that's been disabled).\r\n\r\n> Note that \r\n> ```cpp\r\n> m_World->BroadcastSoundEffect(\"record_cat\", m_PosX, m_PosY, m_PosZ, 0.2, 0.5);\r\n> ```\r\n> doesn't actually play the \"record_cat\" disk as you'd think it would\r\n\r\nThat's because BroadcastSoundEffect expects sound effect IDs, not item IDs &mdash; use `record.11`, `record.13`, `record.blocks`, `record.cat`, `record.chirp`, `record.far` `record.mall`, `record.mellohi`, `record.stal`, `record.strad`, `record.wait`, and `record.ward`.  However, playing records this way doesn't display the flashing \"Now playing\" text.  (A list of sound IDs can be found in vanilla's sounds.json or via [burger](http://pokechu22.github.io/Burger/1.10.html#sounds)).  "}}
{"actor":{"display_login":"Pokechu22"}}