Ability to change the data of an array element whitout deleting the current data stored in that element.
For example if a dispenser would have this data:
{Items: [{Slot: 0b, id: "minecraft:diamond_sword", Count: 1b}], Lock: ""}
Then you could add this data:
{tag:{display:{Lore:["This is line 1", "and this is line 2]"}}}
to the Element 0 of the array "Items" and the new data would look like this:
{Items: [{Slot: 0b, id: "minecraft:diamond_sword", Count: 1b, tag:{display:{Lore:["This is line 1", "and this is line 2]"}}}], Lock: ""}
Also, a new Element could be added to the end of an array.
This could be done with /data add wich would work a bit simillar to /data remove:
/data add <block/entity> <coordinates/selector> <path to array> <nbt>
In the array path, you coulod also use Array[#] to acces the end of the array
2 Comments
Please sign in to leave a comment.
Post a new comment: