Mojira Archive
MC-275235

Goat horn instruments do not accept non-default sound events

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.

Invalid

Ellivers

2024-08-15, 04:11 PM

2024-09-05, 09:21 AM

2024-08-17, 04:51 PM

0

0

Unconfirmed

(Unassigned)

24w33a

-