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

Inconsistency in parsing sound event resources location

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 24w21b
    • None
    • Unconfirmed
    • (Unassigned)

      Using a simple string with a custom namespace in a sound event resources location will fail, which causes the data pack to be considered invalid and not loaded.

      This is a inconsistency with all others resources location parsing that accept custom namespace in the string format. The sound event resources location are the only one that require a specifique form to use custom namespace.

      Know place when this inconsistency occurs: "ambient_sound" in biomes files, "sound_event" in jukebox_song files.

      Know place when this inconsistency not occurs (you can use custom namespace in the string format): "playsound" command.

       

      For example:

      Note: I will use the "jukebox_song" file, but this inconsistency occurs in several others place inside the default data.

      The default "sound_event" for the music disc "creator.json":

      {
        "comparator_output": 12,
        "description": {
          "translate": "jukebox_song.minecraft.creator"
        },
        "length_in_seconds": 176.0,
        "sound_event": "minecraft:music_disc.creator"
      }
      

      However, if you want to use a custom namespace sound event, this doesn't work:

      {
        "comparator_output": 12,
        "description": "Test custom: anubis",
        "length_in_seconds": 156.0,
        "sound_event": "custom:music_disc.anubis"
      }
      

      And you need to obligatory use this "complete" form:

      {
        "comparator_output": 12,
        "description": "Test custom: anubis",
        "length_in_seconds": 156.0,
        "sound_event": {
          "sound_id": "custom:music_disc.anubis"
        }
      }
      

       

      To reproduce:

      1. Download 'sound_event_bug-resources.zip' and place it in the resource packs folder. Add the resource pack to the active packs list.
      2. Download 'sound_event_bug-data.zip' and place it in the world folder.
      3. Attempt to load the world the data pack 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 a sound event with custom namespace can be used with his string format.

            Unassigned Unassigned
            un_pogaz un_pogaz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: