Tutorials/Command NBT tags

This page will be updated as soon as the formatting is complete and more progress has been made into the NBT Tags that can be attached to commands in 13w36a. For now see this Minecraft Forum Topic regarding the NBT Tags that can be added to the commands and :

As of snapshot 13w36a, NBT tags can be specified for items and entities created with the /give and /summon commands. Each tag has the format : ; multiple tags are separated by commas. The contents of List tags are enclosed in square brackets [], while the contents of Compound tags are enclosed in curly braces {} – note that the entire data tag is itself a Compound tag. Tag names are case-sensitive, and white space is ignored.

See Entity Format for the various NBT Tags that are saved for each Entity. This page also contains basic information for each NBT Tag.

When None is used in a Tagname that means that this tag can be put directly into the start of the dataTag

Items
These can be used in /give commands as well as /clear. for such commands as /summon and /setblock, place them inside of a tag tag, like so:  {id:"stone",Count:3 ... tag:{Name:"your name" ...}} These tags can be used on any item The following table provides more details on previous sub-tags.

Blocks
These tags are put on blocks as items.

Entities
{| class="wikitable" style="width:100%" ! width="10%" align="center" | NBT Tag ! width="50%" align="center" | Description ! width="10%" align="center" | Allowed tagnames ! width="10%" align="center" | Required tagnames ! width="20%" align="center" | Syntax This tag is a JavaScript Array, with the consecutive values being: Held Item, Helmet, Chestplate, Pants, Boots. Any slot can be blank to indicate no item. The helmet can contain a block, which will display on the entities head. The following table provides information on each tagname that can be added in an NBT Tag. These tagnames are specific to the command. = Blocks = Tags used in setblock and /fill
 * TileEntityData
 * Used to store all data kept within a block. Mainly used within blocks that can store items or contain various data values. I.E. Command blocks, Chests, Jukeboxes, Dispenser, Beacon, etc.
 * CustomName, Items, Command, Levels, Primary, Secondary, Delay, MaxNearbyEntities, MaxSpawnDelay, MinSpawnDelay, RequiredPlayerRange, SpawnCount, SpawnRange, EntityID
 * None
 * TileEntityData:{}
 * direction
 * Similar to motion, determines the direction that an entity will be moving upon being summoned. Must be entered as double precision floating point values (it has a decimal) Example: {direction:[0.0,1.0,0.0]} summons with an upwards velocity of 1.0.
 * X, Y, Z
 * All
 * direction:[X,Y,Z]
 * Motion
 * Similar to direction, determines the direction that an FallingSand entity will be moving upon being summoned. Must be entered as double precision floating point values (it has a decimal) Example: {Motion:[0.0,1.0,0.0]} summons with an upwards velocity of 1.0.
 * X, Y, Z
 * All
 * Motion:[X,Y,Z]
 * ActiveEffects
 * Sets the effects that will apply to a mob after it's summoned.
 * Id, Duration, Amplifier, Ambient
 * All
 * ActiveEffects:[{Id:,Duration:,Amplifier:,Ambient:},{Id:,Duration:,Amplifier:,Ambient:}]
 * Riding
 * Shows the information of the Entity that is stacked below another Entity.
 * id, Riding, CustomName, ActiveEffects
 * id
 * Riding:{id:}
 * Equipment
 * Adds armor & weapons to the Skeleton or Zombie.
 * id, Riding, CustomName, ActiveEffects
 * id
 * Riding:{id:}
 * Equipment
 * Adds armor & weapons to the Skeleton or Zombie.
 * Adds armor & weapons to the Skeleton or Zombie.
 * Item
 * Item
 * Equipment:[{id:"",Count:,tag:{}...},{id:,Count:...},{id:...},{id:},{id:}]
 * DropChances
 * Determines how likely it is for an entity to drop held or worn Items. The tag Count in the equipment tag must be 1 or greater for this to work.
 * 5 separate float values(1 for each slot). 0.0f-1.0f determines likelihood of dropping, but will apply a random durability if it does. Anything greater than 1.0f will make it always drop with full durability.
 * Since it is a float value, it must be phrased as "X.Yf", with X and Y being values of your choice.
 * {DropChances:[0.1f,2.0f,1.0f,1.1f,0.0f]
 * Attributes
 * Customizes the attributes of the entity. See Attributes for more details
 * Name: see Attributes for a list. Base: the amount to apply. Modifiers: how much and how it should vary. Contains values Name, Amount, Operation, UUIDMost, UUIDLeast.
 * Name and Base
 * {Attributes:[{Name:"generic.maxHealth",Base:40,Modifiers:[{Name:generic.maxHealth,Amount:7,Operation:0,UUIDMost:4000,UUIDLeast:8000}]
 * {Attributes:[{Name:"generic.maxHealth",Base:40,Modifiers:[{Name:generic.maxHealth,Amount:7,Operation:0,UUIDMost:4000,UUIDLeast:8000}]

Generic
These tags can be used on most tile entitied blocks

Beacon
==