When enabling/disabling datapacks that contain jukebox_song entries, the world needs to be restarted for the song registry to update.
Steps to reproduce:
Create a datapack (lets call it 'example') with a custom jukebox_song (lets call that 'custom_song')
example
- pack.mcmeta
- data
- example
- jukebox_song
- custom_song.json/datapack enable "file/example"
Run
/give @s dirt[minecraft:jukebox_playable={"song":"example:custom_song"}]
Observed result:
Malformed 'minecraft:jukebox_playable' component: 'Failed to parse either. First: failed to get element example:custom_song; Second: Cannot parse as key without registry'
Expected result:
The jukebox_song from the newly added datapack is recognized as a valid value for the jukebox_playable component.
However when restarting the world after enabling the datapack, the jukebox_song registry is filled correctly and contains the new song(s).
/datapack enable "file/example"
Restart the server or exit and re-enter the world
Run
/give @s dirt[minecraft:jukebox_playable={"song":"example:custom_song"}]
This produces the expected behaviour and creates a dirt block with a jukebox_playable component.
Linked issues
is duplicated by 1
relates to 4
Attachments
Comments 4
Note that this behavior is shared across dynamic registries (with the notable legacy exception of loot tables). I believe there are more similar issues and possibly ones relating to this registry specifically, but some I found are: MC-272540 (enchantments, WAI) and MC-260452 (damage types, triaged as normal priority). The latter connects to a forest of other reloadable registry issues.
Thanks for the clarification @haykam, after some digging around I also heard about other registries sharing this issue. If it really is intended behaviour, I'd love to have some explicit mentioning of this in the 1.21 release notes or something like that. Or did I just miss some general mention of registries requiring a reload in a previous version's patchnotes?
Thank you for your report!
After consideration, the issue is being closed as Invalid.
You have posted a feature request or a suggestion. This site is for bug reports only.
For suggestions, please visit The official Minecraft feedback site or visit the Minecraft Feedback Discord server.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Please attach a datapack that can be used to reproduce this issue