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

Equippable data component doesn't allow for custom sounds

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 24w37a
    • None
    • Windows 10
    • Unconfirmed

      Commands that use the equippable item component will fail to run if the 'equip_sound' field contains a sound added with a resource pack, making it impossible to get an item with custom equip sounds.

      What I expected to happen was...:
      The command is run and an equippable item is produced that plays a sound from the resource pack when equipped, similar to how the playsound command works, with 'minecraft:item.armor.equip_generic' or silence when the resource pack is removed

      What actually happened was...:
      The command fails when run, with error: Malformed 'minecraft:equippable' component: 'Failed to get element ResourceKey[minecraft:sound_event / namespace:example]' The namespace doesn't seem to matter, even if it is the 'minecraft' namespace

      Steps to Reproduce:
      1. Select the attached resource pack or any resource pack with custom sounds
      2. Run /playsound minecraft:example.test_pop and/or /playsound other:example.test_pop to make sure the game can access the sound as it should (optional)
      3. Run /give @s minecraft:stick[minecraft:equippable=\{slot:'head',equip_sound:'example.test_pop'}] and/or /give @s minecraft:stick[minecraft:equippable=\{slot:'head',equip_sound:'other:example.test_pop'}]

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

              Created:
              Updated:
              Resolved: