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

"minecraft:" sometimes required for key name in data merge

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • 24w10a
    • None
    • Confirmed
    • Commands

      How to reproduce

      1. Place an item frame with an item in it
      2. Run the following command 
        /data merge entity @e[type=item_frame,sort=nearest,limit=1] {Item: {components:{"custom_name": '{"text":"Hello"}'}}}
        
      3. Notice that the item was given the custom name as expected
      4. Run the following command to change the custom name
        /data merge entity @e[type=item_frame,sort=nearest,limit=1] {Item: {components:{"custom_name": '{"text":"World!"}'}}}
        
      5. The item wasn't renamed, the command silently failed, and an error was logged to the console
        [00:45:25] [Server thread/ERROR]: Tried to load invalid item: 'Duplicate entry for key: 'b[type=minecraft:custom_name, removed=false]' missed input: {custom_name:'{"text":"World!"}'}'
        
      6. Now run the following command to rename the item, including the minecraft: prefix
        /data merge entity @e[type=item_frame,sort=nearest,limit=1] {Item: {components:{"minecraft:custom_name": '{"text":"World!"}'}}}
        
      7. Notice that this worked

            Unassigned Unassigned
            kcrca Ken
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: