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

Goat horn instruments do not accept non-default sound events

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 24w33a
    • None
    • Unconfirmed
    • (Unassigned)

      When specifying a sound event that is not part of Minecraft by default inside of a goat horn instrument JSON file, the instrument fails to load and the world cannot be opened. This is likely due to that the server doesn't know what sound events have been added by resource packs.

      Steps to reproduce

      1. Create a new sound in a resource pack's sounds.json file, which points to a sound file.
        For example:
        "test_sound": {
              "sounds": [
                "namespace:test_sound"
              ]
            }
      2. In a data pack, create a goat horn instrument JSON file in the data/instrument folder. In the sound_event field, specify the sound even in the resource pack.
        For example:
        {
          "sound_event": "namespace:test_sound",
          "use_duration": 0.001,
          "description": "",
          "range": 16
        }
      3. Open the world.

      Observed result
      The world cannot be opened, as errors were found in the pack. The log contains something akin to this error message:

      Caused by: java.lang.IllegalStateException: Failed to get element ResourceKey[minecraft:sound_event / namespace:test_sound]

      Expected result
      No error appears and the custom goat horn instrument is able to be used.

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

              Created:
              Updated:
              Resolved: