Talk:NBT

From wiki.vg
Revision as of 00:52, 26 November 2011 by Barneygale (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

I find myself a bit confused regarding the TAG_String name thing. I understand that it is used to identify each tag, but the portion which confuses me is that the article implies that not all tags have this name attached to them, "Note that ONLY Named Tags carry the name and tagType data. Explicitly identified Tags (such as TAG_String above) only contains the payload."

Now, my question is, what is considered a named tag, and what is not?

~Thanks

"Tagged" imples: tag type, name, payload. "Untagged" implies just the payload. If you had a TAG_List of TAG_Shorts, each element of the list is *just* the short payload, i.e. 2 bytes per element. As such the children of TAG_Lists are unnamed. TAG_Lists define a "tagId" at the start of their payload so you know what kind of tag you're reading. Named tags exist only in two circumstances: 1) As children of TAG_Compound, 2) As the root node. Barneygale 17:52, 25 November 2011 (MST)