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
/data modify storage mc-227538: list set value [[0], [], [2]]/data modify storage mc-227538: list set value [[0], [], [2]]/data modify storage mc-227538: list[] insert 1 value 3/data modify storage mc-227538: list[] insert 1 value 3→ ❌
Invalid list index: 1/data get storage mc-227538: list/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.
Comments 0
No comments.