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

Consumable item components with inlined sound event definitions cause undefined behavior

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 24w34a
    • None
    • Confirmed
    • Commands, Items, Sound
    • Important
    • 1287256
    • Expansion B

      Giving the player an item stack with a minecraft:consumable component that uses an inline sound definition causes many undefined behaviors with items, such as ghost items, items not stacking together, and difficulty with splitting/grouping items in the inventory.

      Steps to reproduce:

      1. In creative mode, run this command:
        /give @s minecraft:stick[minecraft:consumable={sound:{sound_id:""}}] 8
      2. Open the inventory and split the stack of sticks with the mouse
      3. Move the sticks around the inventory slots with the mouse
      4. Then combine the sticks back into one stack

      Expected result:
      The player is left with single stack of sticks they could split, move, and recombine with no issue.

      Observed result:
      The player will have multiple stick stacks that won't combine back into one stack. The data of the sticks appears unchanged, but they won't stack together. Some ghost sticks may be present from moving the sticks around.

      Running the command multiple times will give a new stack of sticks each time, instead of adding to an existing stack.

            Unassigned Unassigned
            18jfisher1 Javitar
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: