Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-273807

Jukebox song registries are experimental and don't update on /reload

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 1.21
    • None
    • Confirmed
    • Data Packs

      When enabling/disabling datapacks that contain jukebox_song entries, the world needs to be restarted for the song registry to update.

      Steps to reproduce:

      1. 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
      2. /datapack enable "file/example"
      3. 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).

      1. /datapack enable "file/example"
      2. Restart the server or exit and re-enter the world
      3. 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.

        1. Example-dp.zip
          1.0 kB
        2. Example-rp.zip
          1.79 MB

            Unassigned Unassigned
            Umbrason Umbrason
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: