NBT tags can be specified for items and entities created with the /give
and /summon
commands. Each tag has the format <tagname>:<value>
where <tagname>
describes what it does, and <value>
is what it applies. Multiple tags are separated by commas. (e.g. {CustomName:'"Bob"', Invisible:true
). The contents of List tags are enclosed in square brackets []
, while the contents of Compound tags are enclosed in curly brackets {}
– note that the entire data tag is itself a Compound tag (All within a set of {}
). Tag names are case-sensitive, and white space is ignored. Additionally, some tags which are either true or false are stored as Byte tags (Example: {NoAI:1b}
)
The player can quickly find data tags (NBT) without the use of external editors by using /data
to figure out the data for each entity or block entity. See more about this in the article Commands/data.
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 tag name that means that this tag can be put directly into the start of the dataTag.
These can be used in /give
and /item
commands as well as /clear
. For commands such as /summon
and /setblock
, place them inside of a tag.
These tags can be used on any item.
id
), the number of items in the stack (Count
) and the NBT data of the item(s) (tag
). It may also contain the Slot
number which the item is in. Any item with a Count
of less than 1 or more than 127 becomes Air.{Item:{id:STRING,Count:BYTE,tag:{Item NBT data here}}}
A copyable example:
{Item:{id:"minecraft:diamond_sword",Count:1b,tag:{Damage:10}}}
id
of the enchantment and the level (lvl
) of the enchantment. Can specify one enchantment or multiple enchantments. It is possible specify no enchantment, which still applies the enchantment glint over the item.{Enchantments:[{id:STRING,lvl:SHORT}, ...]}
A copyable example: {Enchantments:[{id:"minecraft:sharpness",lvl:1s}]}
Name
, colors (leather armor), and lore to items. Lore
may have multiple lines.color
is a hexadecimal color value, except in decimal. An RGB to hexadecimal converter can be found here and a hexadecimal to decimal converter can be found here.Names and lore must be passed as raw JSON text.
{display:{Name:STRING,Lore:[STRING,STRING, ...],color:INT}}
A copyable example:
{display:{Name:'{"text":"Tunic of Destiny","color":"blue",...}',Lore:['{"text":"A magical blue tunic"}','{"text":"worn by the gods..."}',color:3949738]}}
{AttributeModifiers:[{AttributeName:STRING,Amount:DOUBLE,Slot:STRING,Operation:INT,UUID:UUID}, ...]}
A copyable example: {AttributeModifiers:[{AttributeName:"generic.max_health",Amount:8d,Slot:"mainhand",Operation:0,UUID:[I;13243,1439,1767,44564]}]}
{Unbreakable:BYTE}
(1b
for true or 0b
for false){SkullOwner:STRING}
(Enter a player's username to get their head)or {SkullOwner:{Name:STRING,Id:UUID,Properties:[{Value:STRING,Signature:STRING}]}}
To hide multiple tags, you need to add the value of the tags you want to hide. For example, if you want to hide the "Enchantments" and the "Attributes modifiers"tags, the value you need to put is 3 (1+2).
{HideFlags:INT}
The value ranges from 1 to 255, representing 255 combinations or 8 binary digits.[1]
When adding to create a unique value:
Adding 1 hides "Enchantments"
Adding 2 hides "AttributeModifiers"
Adding 4 hides "Unbreakable"
Adding 8 hides "CanDestroy"
Adding 16 hides "CanPlaceOn"
Adding 32 hides other information, including potion effects, shield pattern info, "StoredEnchantments", written book "generation" and "author", "Explosion", "Fireworks", and map tooltips
Adding 64 hides "Dyed" on leather armors
Adding 128 hides "Upgrade" on armors
In logical form:
(HideEnchantments) | (HideAttributeModifiers << 1) | (HideUnbreakable << 2) | (HideCanDestroy << 3) | (HideCanPlaceOn << 4) | (HideOthers << 5) | (HideDyed << 6) | (HideUpgrade << 7)
missingno
".{CanDestroy:[STRING, ...]}
(Each string specifies a block id or block tag followed by the blockstate and NBT)A copyable example:
{CanDestroy:["minecraft:stone","#minecraft:logs","minecraft:player_head[rotation=8]{SkullOwner:{Name:'Dinnerbone'}}"]}
{PickupDelay:INT}
Allowed 1 amount of same NBT Tags.
{Age:INT}
Unknown amount of allowed same NBT Tags.
{generation:INT}
0: Original
1: Copy of original
2: Copy of a copy
3: Tattered
{title:"book title here"}
Can be hidden by using HideFlags:32
{author:"book author here"}
Note that for the book to properly display the text, a title and an author must also be provided, otherwise the book will display the message * Invalid book tag *
{pages:['{"text":"Any json text can be used here!"}','{"text":"Page 2!"}']}
{Fireworks:{Explosions:[{Colors:[I;INT, ...],FadeColors:[I;INT, ...],Flicker:BYTE,Trail:BYTE,Type:BYTE}, ...],Flight:BYTE}}
A copyable example:
{Fireworks:{Explosions:[{Type:3b,Flicker:1b,Colors:[I;4312372],FadeColors:[I;11743532]}],Flight:1b}}
The following table describes more details on Enchantments sub-tag.
Example command: /give @p minecraft:carved_pumpkin{Enchantments:[{id:"minecraft:efficiency",lvl:5s}]} 1
The following table describes more details on display sub-tag.
Example command: /[[Commands/'"`uniq--nowiki-0000000f-qinu`"'|'"`uniq--nowiki-0000000f-qinu`"']]
One can further modify the text with things like italics and boldness like so: /[[Commands/'"`uniq--nowiki-00000010-qinu`"'|'"`uniq--nowiki-00000010-qinu`"']]
The following table describes more details on the Fireworks sub-tag.
These tags are put on blocks as items.
These tags are used when using the /summon
command to spawn entities or when using the /data
to edit the data of entities.
{TileEntityData:{Entity NBT data here}}
{Motion:[DOUBLE,DOUBLE,DOUBLE]}
This tag determines only the entity's velocity, not the direction that it's facing.
{direction:[DOUBLE,DOUBLE,DOUBLE]}
{power:[DOUBLE,DOUBLE,DOUBLE]}
{ActiveEffects:[{id:STRING,duration:NUMBER,amplifier:BYTE,ambient:BYTE,show_particles:BYTE,show_icon:BYTE}, ...]}
{rewardExp:BYTE}
(0b
for false or 1b
for true){Passengers:[{id:STRING, ...}, ...]}
{ArmorItems:[{Count:BYTE,id:STRING,tag:{...}},{Count:BYTE,id:STRING,tag:{...}},{Count:BYTE,id:STRING,tag:{...}},{Count:BYTE,id:STRING,tag:{...}}]}
{HandItems:[{Count:BYTE,id:STRING,tag:{...}},{Count:BYTE,id:STRING,tag:{...}}]}
{HandDropChances:[FLOAT,FLOAT]}
{ArmorDropChances:[FLOAT,FLOAT,FLOAT,FLOAT]}
{NoAI:BYTE}
(0b
for false or 1b
for true){NoGravity:BYTE}
(0b
for false or 1b
for true){Silent:BYTE}
(0b
for false or 1b
for true){Fire:SHORT}
(ranges from 0 to 32767){Invulnerable:BYTE}
(0b
for false or 1b
for true){Attributes:[{Name:STRING,Base:DOUBLE,Modifiers:[{Name:STRING, Amount:DOUBLE,Operation:BYTE,UUID:[I;INT,INT,INT,INT]}]}
{Health:FLOAT}
AngryAt
for AngerTime
ticks.{AngerTime:INT,AngryAt:[I;INT,INT,INT,INT]}
{CustomName:'"Custom Name"'}
or you can use{CustomName:'{"text":"Name Here ","color":"blue",...}'}
{CustomNameVisible:BYTE}
(0b
for false or 1b
for true){PersistenceRequired:BYTE}
(0b
for false or 1b
for true)The following table provides information on each tagname that can be added in an NBT Tag. These tagnames are specific to the /summon
command.
Slimes
{BlockState:{Name:"minecraft:oak_log", Properties:{axis:"y"}}}
These tags are used when summoning villagers. (Offers NBT can't be done in 1.14+)
These tags are used when summoning itemframes.
These tags are used when summoning armor stands.
Note: The Equipment tag also works for armor stands.
These tags are used when summoning turtles.
These tags are used when using /setblock
or /summon
(spawner minecarts) to create spawners. Add only those data tags you want to avoid a potential error.
Sub-tags used in the SpawnPotentials data tag.