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)
 * . We can introduce each argument type individually in argument types, so we don't have to repeat the same description in many different command sub-pages. Also, writing necessary descriptions right after the node in a command syntax tree would make it easier to understand the command. However, this may also require changes to the Bedrock Edition commands. Since BE commands and JE commands have the similar usage but differ in command syntax, my suggestion is that remain the first several paragraphs in the Commands part, and split all other paragraphs to Java_Edition_Commands_Syntax and 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)

Splitting NBT path section into separate page
Though they are mostly used in the command, NBT paths are also used in other places like raw JSON text or the  command.

For this reason, it would make sense to split this section into a separate page that is referred to or embedded in all aforementioned occurences instead of having all other pages refer to the page of the command. --Kappascopezz (talk) 12:07, 31 January 2020 (UTC)


 * , should be explained at NBT format instead, and also have that page elaborate on the stringified NBT syntax to begin with, I know that page says to look at Tutorials/Command NBT tags for the syntax in-game, but honestly, that page is ancient and nobody looks at it. FVbico (talk) 12:16, 31 January 2020 (UTC)