Tutorials/Command NBT tags (2024)

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.

NBT TagDescriptionAllowed amount of same NBT TagsRequired tagnamesSyntaxItemUsed for any instance of item(s), it includes the resource location of the item(s) (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.1id, Count{Item:{id:STRING,Count:BYTE,tag:{Item NBT data here}}}

A copyable example:

{Item:{id:"minecraft:diamond_sword",Count:1b,tag:{Damage:10}}}

EnchantmentsUsed for the addition of enchantments to items, it includes the 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.AnyAll{Enchantments:[{id:STRING,lvl:SHORT}, ...]}

A copyable example: {Enchantments:[{id:"minecraft:sharpness",lvl:1s}]}

StoredEnchantmentsDefines the enchantments stored in a enchanting book.AnyNone{StoredEnchantments:[{id:"minecraft:mending",lvl:1s}]}EntityTagUsed to add nbt arguments to spawn eggs or other items that summon entities such as armor stands or item frames.1None{EntityTag:{Entity NBT data here}}displayUsed for the addition of a custom 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.

AnyAt least one{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]}}

AttributeModifiersCan be used to add attributes to mobs or items. For more information, see Attribute.AnyAll{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]}]}

UnbreakableUsed to make items with durability that never degrades.1All{Unbreakable:BYTE} (1b for true or 0b for false)SkullOwnerUsed for getting player heads.1All{SkullOwner:STRING} (Enter a player's username to get their head)

or {SkullOwner:{Name:STRING,Id:UUID,Properties:[{Value:STRING,Signature:STRING}]}}

HideFlagsUsed to hide flags (the info in the tool tip) such as enchantments, CanDestroy, CanPlaceOn, etc.

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).

AnyAll{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)

CanDestroyThis tag is used when making adventure maps to allow a specific tool/item to break a block. Apply the tag to any item/tool. If the value is not a valid block or item it displays as "missingno".1At least one{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'}}"]}

PickupDelayThe number of ticks before an item entity can be picked up.1All{PickupDelay:INT}AgeThe duration before an item disappears.Any number. Set to -32768 for items that don't disappear. If Age counts up to 6000 (5 minutes if Age started at default value 0), the item disappears.

Allowed 1 amount of same NBT Tags.

All{Age:INT}generation (Minecraft Java Edition 1.8)Defines whether a written book is labeled as an "Original", a "Copy of Original", a "Copy of a copy" or "Tattered"."Original", "Copy of Original", "Copy of a copy", "Tattered"

Unknown amount of allowed same NBT Tags.

At least one{generation:INT}

0: Original

1: Copy of original

2: Copy of a copy

3: Tattered

titleDefines the title of a written_book.AnyString{title:"book title here"}authordefines the author of a written_book.

Can be hidden by using HideFlags:32

AnyString{author:"book author here"}pagesAn array that defines the pages of a written_book.

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 *

AnyAt least one{pages:['{"text":"Any json text can be used here!"}','{"text":"Page 2!"}']}FireworksUsed when giving yourself firework rockets, this value defines what the rocket will do when launched: color, flight duration, shape, etc.AnyAt least one{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.

NBT TagDescriptionAllowed tagnamesRequired tagnamesSyntaxTileEntityDataUsed to store all data kept within a block. Mainly used within blocks that can store items or contain various data values, e.g., Command blocks, Chests, Jukeboxes, Dispenser, Beacon, etc.CustomName, Items, Command, Levels, Primary, Secondary, Delay, MaxNearbyEntities, MaxSpawnDelay, MinSpawnDelay, RequiredPlayerRange, SpawnCount, SpawnRange, EntityIDNone{TileEntityData:{Entity NBT data here}}MotionDetermines the initial velocity of most entities (all other than Dragon Fireballs, Fireballs, Small Fireballs and Wither Skulls) upon being summoned. Must be entered as double precision floating point values (decimals). Example: {Motion:[0.0,1.0,0.0]} summons with an initial upward velocity of 1.0. The values could be only -10 to 10, because it could have been to be moved very fast. It normally could lead to a wall clip.n/aAll{Motion:[DOUBLE,DOUBLE,DOUBLE]}directionSimilar to Motion, determines the initial velocity of Dragon Fireballs, Fireballs, Small Fireballs, and Wither Skulls upon being summoned. This tag is required to summon said entities, otherwise the command fails. Example: {direction:[0.0,1.0,0.0]} summons with an initial upward velocity of 1.0.

This tag determines only the entity's velocity, not the direction that it's facing.

n/aAll{direction:[DOUBLE,DOUBLE,DOUBLE]}powerSimilar to direction, but determines constant acceleration. Example: {power:[0.0,1.0,0.0]} gives the summoned entity a constant upward acceleration of 1.0. Entities are still affected by drag when power is nonzero and eventually reaches a terminal velocity. Affects only Dragon Fireballs, Fireballs, Small Fireballs, and Wither Skulls.n/aAll{power:[DOUBLE,DOUBLE,DOUBLE]}active_effectsSets the effects that apply to a mob after it is summoned. Type -1 to apply its countdown to infinity. It should hide its numbers to *.Id, Duration, Amplifier, Ambient, ShowParticlesAll{ActiveEffects:[{id:STRING,duration:NUMBER,amplifier:BYTE,ambient:BYTE,show_particles:BYTE,show_icon:BYTE}, ...]}rewardExpControls villagers giving xp for trading, set to true or false. Normally, villagers can reward you experience orbs.True/False{rewardExp:BYTE} (0b for false or 1b for true)PassengersSets which entities are riding on top of the base entity. Allows multiple entities to ride one base entity. Riding entities are still able to do all stuff they have coded. Like enemies shooting on each other etc. Do not use a recent mob (if it doesn't exist in your old version Minecraft).all (not checked)id{Passengers:[{id:STRING, ...}, ...]}ArmorItemsDefines what items are being worn by the mob. Items go in slots Feet, Legs, Chest, Head, in that order.ItemNone{ArmorItems:[{Count:BYTE,id:STRING,tag:{...}},{Count:BYTE,id:STRING,tag:{...}},{Count:BYTE,id:STRING,tag:{...}},{Count:BYTE,id:STRING,tag:{...}}]}HandItemsDefines what item is within the mainhand and offhand. First item is the mainhand, second is offhand.ItemNone{HandItems:[{Count:BYTE,id:STRING,tag:{...}},{Count:BYTE,id:STRING,tag:{...}}]}HandDropChancesDetermines how likely it is for an entity to drop held Items. The tag Count in the equipment tag must be 1 or greater for this to work.2 separate float values, one for the main hand and one for the off-hand slot. 0.0-1.0 determines likelihood of dropping, but applies a random durability if it does. Anything greater than 1.0 makes it always drop with full durability.Since it is a float value, it must be phrased as "X.Y", with X and Y being values of your choice.{HandDropChances:[FLOAT,FLOAT]}ArmorDropChancesDetermines how likely it is for an entity to drop worn Items. The tag Count in the equipment tag must be 1 or greater for this to work.4 separate float values, one for each slot. 0.0-1.0 determines likelihood of dropping, but applies a random durability if it does. Anything greater than 1.0 makes it always drop with full durability.Since it is a float value, it must be phrased as "X.Y", with X and Y being values of your choice.{ArmorDropChances:[FLOAT,FLOAT,FLOAT,FLOAT]}NoAIMakes mobs have no AI, resulting in mobs not moving on their own. However, they still react to other changes in the environment. For example, the Zombie can still burn in the sun.{NoAI:BYTE} (0b for false or 1b for true)NoGravityMakes mobs unaffected by gravity. Mobs do not fall. Mobs cannot walk in the air.{NoGravity:BYTE} (0b for false or 1b for true)SilentMakes mobs silent. Does not work for certain sounds, see MC-64242.{Silent:BYTE} (0b for false or 1b for true)FireDetermines how many ticks a mob is on fire. When Fire reaches one, the fire stops, and the mob no longer takes damage. When a mob is not on fire, this value is 1.{Fire:SHORT} (ranges from 0 to 32767)InvulnerableMakes mobs invulnerable to everything except the Void and players in Creative Mode. Mobs do not attack or run away from invulnerable mobs.{Invulnerable:BYTE} (0b for false or 1b for true)AttributesCustomizes the attributes of the entity. See Attribute for more detailsName: see Attribute for a list. Base: the amount to apply. Modifiers: how much and how it should vary. Contains values Name, Amount, Operation, UUID.Name and Base{Attributes:[{Name:STRING,Base:DOUBLE,Modifiers:[{Name:STRING, Amount:DOUBLE,Operation:BYTE,UUID:[I;INT,INT,INT,INT]}]}HealthNumber of hearts (for hearts above the default maximum you must change the base value of the 'generic.max_health' attribute).All MobsNumber in half hearts{Health:FLOAT}AngerTime, AngryAtA neutral mob becomes aggressive toward AngryAt for AngerTime ticks.Summoning neutral mobsNumber in ticks, paired with a UUID{AngerTime:INT,AngryAt:[I;INT,INT,INT,INT]}CustomNameSummons a mob with a name that appears above their head.All MobsA JSON Text component{CustomName:'"Custom Name"'} or you can use

{CustomName:'{"text":"Name Here ","color":"blue",...}'}

CustomNameVisibleAlters the visibility of a custom name. 0b Means that the name is only visible when looking at the mob (default), and 1b means the name is always visible. Must use CustomName JSON code first to perform it.All MobsByte, 0b or 1b{CustomNameVisible:BYTE} (0b for false or 1b for true)PersistenceRequiredMobs are undisappearable on time. Tamed animals without commands can also evolve this action.All MobsTrue/False{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.

NBT TagDescriptionUsed InValue TypeAllowed ValuesTypeUsed to change the type of mobs, like horses. Setting a horse's type to 4 makes it a skeleton horse.SummonInteger1 - JavaOverflowLimitSaddleUsed to spawn horses or pigs that have saddles on.SummonBoolean Binarytrue / false or 1 / 0TameUsed to spawn tamed horses.SummonBoolean Binarytrue / false or 1 / 0VariantChanges the horse or axolotl variant. Setting no variant or putting an incorrect variant spawns a normal white horse or pink axolotl. See Horse Variants for the list of horse variants.Summoning HorsesInteger1 - 1030SizeChanges the size of a slime, magma cube or phantom summoned into the game. Anything higher than 255 summons size 255. Anything lower than 0 summons size 0. More than 32 tends to cause extreme lag.(The high size of slime or magma cube may gotta lead to a crash. Things on your world won't be saved if you restart the game.)Summoning

Slimes

Integer0 - 255BlockStateDetermines which block is being summoned when using /summon Falling_block. Use Data values to find out the ID of each block. You can also use F3+H in-game to show the ID's of items in-game.Summoning Falling_block (AKA Fallingsand)Block ID and Block States e.g.{BlockState:{Name:"minecraft:oak_log", Properties:{axis:"y"}}}All StringsTimeWhether or not the block despawns before hitting the ground. If set to 1 the block falls normally, if set to less than 1 it is set to 0. If set to 0 the block despawns immediately. Recommended to keep this value as 1.Summoning Falling_blockInteger (Include Negatives)-1 - 127DropItemWhether or not the block drops its item form if the block is unable to be placed. If set to 0 the block does not drop its respective item, if set to 1 the block drops its respective item.Summoning Falling_blockBoolean Binary0 or 1idDetermines the entity the other entity is riding on.SummonResource location {id:"minecraft:creeper"}Any resource location corresponding to an EntityFuseDetermines how long it takes for PrimedTnt or a Creeper to explode.SummonShort0 - 32767ExplosionPowerUsed when summoning fireballs, Withers, and Ghasts to set the power of the explosionSummonInteger0-127; Beyond 127 no explosion;ExplosionRadiusUsed when summoning Creepers to set the radius of the explosionSummonByte0-127poweredDetermines whether a Creeper is charged or notSummonBoolean Binary0 or 1PersistenceRequiredMobs are undisappearable on time. Tamed animals without commands can also evolve this action.SummonTrue/False{PersistenceRequired:1} or {PersistenceRequired:0}AttachFaceDetermines what face the bottom of the shulker lies on.Summoning ShulkersByte0b - 5bPeekDetermines how far the Shulkers upper half opens. Positive values make the upper half open with a spin, Negative values appear to make the upper half open without a spin.Summoning ShulkersByte-127b - 127bAPXMore information is required on this entry. Appears to be approximated X position.Summoning ShulkersIntegerAny whole numberAPYMore information is required on this entry. Appears to be approximated Y position.Summoning ShulkersIntegerAny whole numberAPZMore information is required on this entry. Appears to be approximated Z position.Summoning ShulkersIntegerAny whole number

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.

Tutorials/Command NBT tags (2024)

FAQs

How do you use NBT tags in commands? ›

NBT tags are used in game commands such as: /summon, /data, /give, /fill, /setblock. The NBT tag is always surrounded in {} such as {NoAI:1}. If there is more than one NBT tag used in a command, the NBT tags are separated by a comma such as {NoAI:1, IsBaby:1}. Each entity (or mob) has its own unique set of NBT tags.

How to see NBT tags? ›

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.

What are NBT tags? ›

The Named Binary Tag (NBT) is a tree data structure used by Minecraft in many save files to store arbitrary data. The format is comprised of a handful of tags. Tags have a numeric ID, a name, and a payload. A user-accessible version in the form of strings is the stringified Named Binary Tag (SNBT) format.

What are NBT tags for fireballs? ›

NBT tags allow you to set certain properties of an entity (such as fireball ). The NBT tag is always surrounded in {} such as {ExplosionPower:4}. If there is more than one NBT tag used in a game command, the NBT tags are separated by a comma such as {ExplosionPower:4,Motion:[3.0,0.0,0.0]}.

Does Bedrock have NBT tags? ›

in Bedrock Edition, there's only one way to store enchantment NBTs: both enchanted items and Enchanted Book share the ench tag. tag: Parent tag.

How does NBT work? ›

For NBT online tests, writers will write AQL in the first session, followed by MAT on the same day. Any deviation from this will be communicated to you. MAT is always written in conjunction with AQL and may not be written as a stand alone test.

How to change item NBT data? ›

The /data command allows the user to get, merge, modify, and remove NBT data of a block entity, entity, or Command NBT storage.

How to copy NBT data in Minecraft? ›

You can use Ctrl + middle mouse click to get an exact copy of the block (tile entities) you are pointing at (with its NBT Tags, that means for chests for example you get also a copy of the chest content).

What is the command for enchantment level 255? ›

For example, for a sword with 255 sharpness, you should type out /give @p minecraft:diamond_sword{Enchantments:[{id:sharpness,lvl:255}]} before pressing the Enter key. The item should be placed in your hotbar or in your inventory if you have no space available in your hotbar.

How do you use NPC commands in Minecraft? ›

NPCs can send commands when interacted with, either when a dialogue screen opens or when players press one of the dialogue buttons. Different commands can be fired depending on what button is pressed so that the NPC or the world can react to your choices!

How do you give items with tags in Minecraft? ›

To give a named item to someone, use /give @p minecraft:stone 1 2 {display:{Name:"NAMED ITEM"}} . This syntax can also be used in /replaceitem . The ("NAMED ITEM") can also be replaced by raw JSON string, and as of some updates, needs to include special "\" backward slash characters.

References

Top Articles
SIS Parent Portal - Fox C-6 School District...Tyler SIS Parent Portal Enhance your connection between your children and their education. To begin using the Parent Portal, follow these - [PDF Document]
Samsung Galaxy A35 5G im Test: Günstiges OLED-Smartphone mit drei Kameras
Star Wars Mongol Heleer
Botw Royal Guard
Belle Meade Barbershop | Uncle Classic Barbershop | Nashville Barbers
Tj Nails Victoria Tx
Delectable Birthday Dyes
Kentucky Downs Entries Today
Tlc Africa Deaths 2021
Kostenlose Games: Die besten Free to play Spiele 2024 - Update mit einem legendären Shooter
Grand Park Baseball Tournaments
World of White Sturgeon Caviar: Origins, Taste & Culinary Uses
Synq3 Reviews
Keniakoop
Best Suv In 2010
I Touch and Day Spa II
All Obituaries | Buie's Funeral Home | Raeford NC funeral home and cremation
623-250-6295
Forum Phun Extra
Td Small Business Banking Login
Ahn Waterworks Urgent Care
Account Now Login In
They Cloned Tyrone Showtimes Near Showbiz Cinemas - Kingwood
Jail Roster Independence Ks
Funky Town Gore Cartel Video
Ringcentral Background
Publix Coral Way And 147
Used 2 Seater Go Karts
Math Minor Umn
Mkvcinemas Movies Free Download
O'reilly's Wrens Georgia
How to Use Craigslist (with Pictures) - wikiHow
Craigslist Central Il
Steven Batash Md Pc Photos
Ny Post Front Page Cover Today
Metra Schedule Ravinia To Chicago
Telegram update adds quote formatting and new linking options
Shih Tzu dogs for sale in Ireland
Pp503063
Craigslist Ludington Michigan
Express Employment Sign In
Live Delta Flight Status - FlightAware
2007 Jaguar XK Low Miles for sale - Palm Desert, CA - craigslist
Cocorahs South Dakota
Cabarrus County School Calendar 2024
Deezy Jamaican Food
The Average Amount of Calories in a Poke Bowl | Grubby's Poke
Aurora Southeast Recreation Center And Fieldhouse Reviews
Sams Gas Price San Angelo
FactoryEye | Enabling data-driven smart manufacturing
Used Auto Parts in Houston 77013 | LKQ Pick Your Part
Dcuo Wiki
Latest Posts
Article information

Author: Laurine Ryan

Last Updated:

Views: 6063

Rating: 4.7 / 5 (57 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Laurine Ryan

Birthday: 1994-12-23

Address: Suite 751 871 Lissette Throughway, West Kittie, NH 41603

Phone: +2366831109631

Job: Sales Producer

Hobby: Creative writing, Motor sports, Do it yourself, Skateboarding, Coffee roasting, Calligraphy, Stand-up comedy

Introduction: My name is Laurine Ryan, I am a adorable, fair, graceful, spotless, gorgeous, homely, cooperative person who loves writing and wants to share my knowledge and understanding with you.