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

Inserting elements into collection tags can be aborted in the middle

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Resolution: Unresolved
    • 1.16.5, 1.17 Release Candidate 1, 1.17, 1.17.1, 21w37a
    • None
    • Confirmed
    • (Unassigned)

    Description

      The bug

      Inserting elements into collection tags by /data modify ... insert ... is aborted on the first failure. This behavior is inconsistent with other commands like /data modify ... set ..., which ignores failures that occur during the process.

      How to reproduce

      1. /data modify storage mc-227538: list set value [[0], [], [2]]
      2. /data modify storage mc-227538: list[] insert 1 value 3

        Invalid list index: 1

      3. /data get storage mc-227538: list

        Storage mc-227538: has the following contents: [[0, 3], [], [2]], element 3 is inserted in the first list, but not in the last list.

      Attachments

        Activity

          People

            Unassigned Unassigned
            intsuc intsuc
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              CHK: