-
Bug
-
Resolution: Invalid
-
None
-
24w21b
-
None
-
Windows 7, Java 21.0.3
-
Community Consensus
Data packs with custom jukebox songs will fail to load if the "sound_event" field is set to a sound event not defined by the vanilla resource pack, causing the game to ask if you want to load the world in safe mode. This will always happen even if there is a resource pack loaded that does define the missing sound event.
For example, the following file is valid:
{ "comparator_output": 0, "description": { "text": "Test" }, "length_in_seconds": 10.0, "sound_event": "ui.toast.challenge_complete" }
But the next one isn't:
{ "comparator_output": 0, "description": { "text": "Test" }, "length_in_seconds": 10.0, "sound_event": "bug:test" }
A sample data pack and resource pack is provided.
To reproduce:
- Download jukebox_resource.zip and place it in the resourcepacks folder. Add the resource pack to the active packs list.
- Download jukebox_datapack.zip and place it in the world folder.
- Attempt to load the world the datapack was added to.
What will happen:
The world will be prevented from loading by an error in the data pack
What was expected to happen:
The world would load and you would be able to give yourself an item with the jukebox_playable component with the song set to "bug:test".
Additional info:
From the game log:
[22:19:42] [Render thread/INFO]: Found new data pack file/jukebox_datapack.zip, loading it automatically [22:19:43] [Render thread/ERROR]: Registry loading errors: > Errors in registry minecraft:jukebox_song: >> Errors in element bug:test: java.lang.IllegalStateException: Failed to parse bug:jukebox_song/test.json from pack file/jukebox_datapack.zip
Caused by: java.lang.IllegalStateException: Failed to get element ResourceKey[minecraft:sound_event / bug:test]