Talk:Commands/data

Treeify command descriptions
Now as we see in Brigadier, commands are in tree format. The utilization of brigadier in vanilla has make command tree structure easier for devs, but it has brought some issues for us, especially in representing a command correctly. Hence, I propose changing all our commands, starting from complex ones (advancement, data, datapack, loot, execute). I have written a draft for the exemplary change of the data command, available at User:Liachmodded/TreeCommandWIP. Any comments or ideas? Feel free to edit on that wip. liach (talk) 10:42, 16 May 2019 (UTC)
 * I really like this idea. Maybe we can even make templates for those trees, showing different icons for literals and arguments. IMO adding description right after each key in the tree will make it clearer than separating the description and syntax. -- SPGoding [  Talk  ] 06:39, 15 December 2019 (UTC)

Lots of new information!
So far "/data modify" has been not very well documented, so I experimented a bit, even got help from two Minecraft developers and created this long post that should be a pretty complete explanation of "/data modify" and also quite a bit about NBT paths in 1.14 and NBT in JSON: https://gaming.stackexchange.com/questions/351488/would-someone-give-a-thorough-explanation-of-1-14-minecrafts-data-modify/351499#351499

It contains example commands, documents all the different features of "/data modify" and gives some possible applications. Can someone please put all this information into the corresponding articles? For example I also couldn't find an explanation of the NBT paths in this wiki, especially not the branching ones. Fabian42 (talk) 16:35, 19 May 2019 (UTC)


 * Should have left this thread at https://minecraft.gamepedia.com/Talk:Commands/data instead. NBT path is already described in page. I also has a bit of description in that tree model template I linked in that data command talk page as well. liach (talk) 23:47, 19 May 2019 (UTC)
 * Moved. And the NBT paths aren't explained very well, especially not the things added in 1.14. Fabian42 (talk) 06:50, 20 May 2019 (UTC)

Blank space?
When defining an element from a list, brackets are used after the key of the list. The content of the brackets can be one of 3 things:


 * Blank space—This returns every element in the list.
 * An index number—For a nonnegative index n, this returns the (n + 1)th element in the list. For a negative index n, this returns the nth element from the end of the list.
 * An NBT compound. This returns all objects in the list that match the specifications of that compound.

What does the "blank space" mean? --LakeJason (Talk • Contribs • Blog)  03:22, 1 August 2019 (UTC)

examples
Can anyone tell me what's wrong if I would like edit the facing data value of a end-portal-frame: "/data modify block 8 63 271 end_portal_frame.facing set value west" --RedstoneFuture (talk) 16:49, 24 October 2019 (UTC)
 * Block states aren't NBT, /data can only edit NBT. FVbico (talk) 16:50, 24 October 2019 (UTC)
 * Thanks ... yes, and with 1.13 Mojang removed the blockdata and entitydata command. Thus, currently we haven't a command for this, right? --RedstoneFuture (talk) 16:58, 24 October 2019 (UTC)