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

Using /data modify with merge and [] doesn't copy the full list

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • Minecraft 18w43a, Minecraft 18w43b
    • None
    • Packaged Java version

      Windows 10 OS
    • Unconfirmed

      When using the following command, the expected result is that all enchantments from the first item in the chest get copied to the second item in the chest since "Enchantments[]" doesn't specify an index number. According to the changelong, "Add [] to select all elements from list".

       

      /data modify block 1091 68 -88 Items[1].tag.Enchantments[] merge from block 1091 68 -88 Items[0].tag.Enchantments[]

       

      Instead the command only copies the last index in the list to the desired item.

      For example, a diamond sword in the first slot has unbreaking and sharpness in that order. An iron sword in the second slot has no enchantments. After running the command, the only enchantment copied over to the iron sword is the one indexed last in the diamond sword. In this case, it would only receive sharpness.

            Unassigned Unassigned
            Silver_David David Bakle
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: