So this will summon a zombie holding an iron sword. Now look at this one:
/execute at @e[nbt={HandItems:[{Count:1,id:"minecraft:iron_sword"}]}] run say found
So this has the same NBT layout as the previous command and it should say "found" whenever a zombie exists (assuming the command is active). But it doesn't. The actual command is:
/execute at @e[nbt={HandItems:[{id:"minecraft:iron_sword"}]}] run say found
Now obviously this comes from the "Count" tag but it isn't obvious anywhere that the count tag is the problem. I had to check like 5 sources to find one that had the correct syntax. This occurs in other places and commands too. The "id" tag isn't capitalized like all the others in the command. The actual id uses only quotes while other quote based tags like "display" or "Name" (different capitalization too) use the new format with backslashes. Additionally some tags only work while quoted while other don't work while quoted. Now I don't think that NBT should have a guide to them like the new target selector arguments but I do think that the various data tags should be changed to be consistent for ease of use.
So the in-game data tags (NBT) are functional but inconsistent. For example, take this command:
So this will summon a zombie holding an iron sword. Now look at this one:
So this has the same NBT layout as the previous command and it should say "found" whenever a zombie exists (assuming the command is active). But it doesn't. The actual command is:
Now obviously this comes from the "Count" tag but it isn't obvious anywhere that the count tag is the problem. I had to check like 5 sources to find one that had the correct syntax. This occurs in other places and commands too. The "id" tag isn't capitalized like all the others in the command. The actual id uses only quotes while other quote based tags like "display" or "Name" (different capitalization too) use the new format with backslashes. Additionally some tags only work while quoted while other don't work while quoted. Now I don't think that NBT should have a guide to them like the new target selector arguments but I do think that the various data tags should be changed to be consistent for ease of use.
This suggestion should probably be moved to the java edition section