Skip to content

fix: jukeboxes not working on the radio - #144

Open
Plexi09 wants to merge 1 commit into
CodinGlitch:1.21.1from
Plexi09:1.21.1
Open

fix: jukeboxes not working on the radio#144
Plexi09 wants to merge 1 commit into
CodinGlitch:1.21.1from
Plexi09:1.21.1

Conversation

@Plexi09

@Plexi09 Plexi09 commented Aug 9, 2026

Copy link
Copy Markdown

The bug was that CompatCore.getSound(...) treated any non-null value from platform/compatibility hooks as a valid sound identifier, so an empty string returned by a compat implementation (e.g. NeoForge) prevented falling back to the vanilla JukeboxSong.fromStack(...). Because MixinJukeboxSongPlayer calls RadioManager.sendRecord / updateRecord with the jukebox ItemStack, that empty/invalid sound identifier got propagated into the radio pipeline and clients could not resolve or play the music disc. I fixed it by requiring the compat hook result to be non-null and non-blank (!result.isBlank()). This allows the code to fall back to the jukebox song data when the compat layer provides no valid sound.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant