Player.dat format

 .dat files are used by servers to store the state of individual players. The format is also used within level.dat files to store the state of the singleplayer player, which overrides any .dat files with the same name as the singleplayer player. These files are in NBT format.

Item structure
Items are used both in the player's inventory and Ender inventory, and in chest tile entities, dropped item entities, furnace tile entities, brewing stand tile entities, and Villager trading recipes. Sometimes a Slot tag is used to specify the slot the item is in, such as with chests; other times there is no Slot tag, such as with dropped items.

General Tags
Items with durability can be made unbreakable and never lose any durability. Additionally, items can have specifications for Adventure mode to describe which blocks may be broken with them.
 * : Parent tag.

Block Tags
Blocks can be given tags to specify what blocks they may be placed against in Adventure mode, and to specify what Tile Entity NBT tags to apply to them when placed.
 * : Parent tag

Enchantments
There are two ways enchantments are associated with items; the first way is that the item is actually enchanted and the enchantment affects the behavior of the item, and the second way is that the item is an enchanted book which simply stores the enchantments without actually affecting the behavior of the item. There is also the RepairCost tag which tracks anvil usage for items, making them more costly with every use of the anvil.
 * : Parent tag.

StoredEnchantments tooltips are not displayed if edited onto an item other than an enchanted book. Enchantments stored in Enchantments, however, are always displayed in the tooltip and cause the item to glow, even if they cannot have any effect.

Attribute Modifiers
All items can be given Modifiers which affect various Attributes of the player or mob wearing or holding them. Note that if an item has default attribute modifiers, these cease to exist if this tag is added (e.g. a diamond sword given an empty AttributeModifiers list no longer provides a boost to damage). Also note that default attribute modifiers do not use this tag, and as such, it does not appear on a natural item.
 * : Parent tag.

Potion Effects
Potions, splash potions, lingering potions, and tipped arrows can have multiple, customized effects via the CustomPotionEffects tag. These effects are added to the default effect under the Potion tag if present. In addition the color can be overridden with the CustomPotionColor tag.
 * : Parent tag.

Crossbows
Crossbows use NBT data to save what item is charged in the crossbow
 * : Parent tag.

Display Properties
Leather armor can be colored, and all items can have custom display names and lore. Various tooltips can also be hidden.
 * : Parent tag.

Written Books
Written books use NBT data to save their contents as well as miscellaneous extra information.
 * : Parent tag.

Book and Quills
Book and Quills use NBT data to save their contents.
 * : Parent tag.

Player Heads
Heads of the player variety can be associated with a specific username to take on the skin of that player when placed. The hand-held item is also updated with the new skin. Within this section, the "owner" of a head means the player whose head it is a copy of, and a player whose inventory contains a head is called the "holder".
 * : Parent tag.

Firework Rockets
Firework Rockets use the tag tag to store information about their effects.
 * : Parent tag.

Firework Stars
Firework Stars use the tag tag to store information about their effects.
 * : Parent tag.

Armor Stands and Spawn Eggs
Armor stands and spawn eggs may contain potential entity data.
 * : Parent tag.

Buckets of Fish
Buckets of Fish may contain potential entity data.
 * : Parent tag.

Maps
Maps may be scaled.
 * : Parent tag.

Suspicious Stew
Suspicious stews store their potion effects.
 * : Parent tag.

Debug Sticks
Debug sticks use the NBT to save the block state to edit for each block.
 * : Parent tag.

Compasses
When used as a lodestone compass, compasses store information about their targeted lodestone.
 * : Parent tag.

Bundle
Bundles use NBT data to save what item is stored.
 * : Parent tag.