mojira.dev
MC-272417

Inconsistency in parsing sound event resources location

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.

Linked issues

Attachments

Comments 2

Works as intended, per https://gist.github.com/boq/08ec7cd9691967d907286b5aa5d6c230

The simple, identifier form does work; you just need to mod the server, as it is handled like blocks or items.

Thank you for your report!
We're tracking this issue in MC-272349, so this ticket is being resolved and linked as a duplicate.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.

un_pogaz

(Unassigned)

Unconfirmed

(Unassigned)

24w21b

Retrieved