Mojira Archive
MC-227538

Inserting elements into collection tags can be aborted in the middle

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

Expected behavior

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

Actual behavior

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

Unresolved

intsuc

2021-06-06, 12:59 AM

2024-12-23, 01:09 PM

4

2

Confirmed

Commands

nbt

1.16.5 - 1.21.41.16.5, 1.17 Release Candidate 1, 1.17, 1.17.1, 21w37a, 1.18.1, 22w03a, 22w05a, 1.18.2 Pre-release 1, 1.18.2, 22w11a, 22w12a, 1.19 Release Candidate 2, 1.19, 1.19.1, 1.19.2, 1.19.3 Release Candidate 1, 1.19.3 Release Candidate 2, 1.19.3, 23w03a, 23w05a, 1.19.4, 23w12a, 23w18a, 1.20 Pre-release 7, 1.20.2, 23w42a, 1.21.4

-