1.9 - NBT Changes and Additions

This thread is to document changes made to NBT data, such as tags or mechanics that have become deprecated/replaced, as well as the new tags/items/entities/blocks implemented. Since this is concerning snapshots, a lot of the following is subject to change. I will update it as 1.9's development progresses. Let me know if I'm missing something or you have extra information to add.

Note that a tag being declared as "removed" means that it is not command-accessible. 1.9 has a cascading update system to replace old tags with new tags on pre-existing entities or blocks, so these "removed" tags are still relevant to the game's source.

All Entities

"Glowing" (byte)

The "Glowing" byte/boolean tag, when set to 1, indefinitely causes the entity to have the outline from the "glowing" status effect.

/summon Creeper ~ ~1 ~ {Glowing:1}

"Tags" (list)

The "Tags" list tag contains a list of string values that can be used with the "tag" selector parameter. The /scoreboard command can assign tags itself.

/summon Creeper ~ ~1 ~ {Tags:["tag1","tag2"]}

/say @e[tag=tag1]

Please note that you cannot have more than one of the same parameter in a selector. For example, the following DOES NOT WORK:

/say @e[tag=tag1,tag=tag2]

Only the final of the duplicate parameters will be used, which in this case is "tag=tag2". You can use other methods to target entities based on multiple tags. For example, the following allows for flawless targeting:

/scoreboard players tag @e add MASTER {Tags:["tag1","tag2"]}

/say @e[tag=MASTER]

"Passengers" (list)

"Passengers" is intended to replace the original "Riding" compound tag. It has the ability to specify multiple passengers at equal depths, unlike "Riding". Instead of the deepest-nested "Riding" entity being the bottom-most in the stack of riding entities, the entity at the root of the data is at the bottom of the stack. For example, the armor stand in the following command is at the bottom of the stack while the cow and pig are at the same depth:

/summon ArmorStand ~ ~1 ~ {Passengers:[{id:"Cow"},{id:"Pig"}]}

"Riding" (compound)

The "Riding" tag has been removed in favor of the new "Passengers" tag.

"UUID" (string)

The deprecated "UUID" tag has been removed. Use "UUIDLeast" and "UUIDMost" instead.

"LeftHanded" (byte)

The "LeftHanded" boolean tag, when set to 1, states the mob's mainhand is the left hand rather than right hand. Note that the "HandItems" structure does not change, since "HandItems" specifies mainhand and offhand, not righthand and lefthand.

"Equipment" (list)

The "Equipment" tag has been removed in favor of the new "HandItems" and "ArmorItems" tags.

"DropChances" (list)

The "DropChances" tag has been removed in favor of the new "HandDropChances" and "ArmorDropChances" tags.

"Health" (float)

The original "Health" tag, stored as a short, has been change to be stored as a float (being the same as the original "HealF" float tag). Tag-type declaration is not required like it was when "Health" was a short.

/summon Creeper ~ ~1 ~ {Health:1.0f}

"Health" (short)

"Health" as a short tag has been removed and replaced with "Health" as a float.

"HealF" (float)

"HealF" has been removed in favor of "Health" now being stored as a float.

All Items

"AttributeModifiers" "Slot" tag (string)

The "Slot" string tag can be used to define what slot the item will apply its modifier in.

Items: Potions

IDs: potion, splash_potion, lingering_potion, tipped_arrow

Please note that the "Damage" value no longer determines the type of potion at all. It will be 0 for all potions.

"minecraft:potion" is only used for drinkable potions.

"minecraft:splash_potion" is now used specifically for splash potions.

"minecraft:lingering_potion" is used for the new "lingering" potion variant.

"minecraft:tipped_arrow" is for arrows that contain potion effects when shot.

"Potion" (string)

The "Damage" value of the potion no longer determines the type of effect and length. Instead, a new item tag called "Potion" will determine the type of potion it is using new name IDs. These IDs are not the same as what's available through /effect, as these IDs are meant to solely replace the "Damage" value. Also note that this is not a replacement for "CustomPotionEffects".

Items: Spawn Eggs

"EntityTag" (compound) & "id" (string)

The use of "Damage" values for spawn eggs to determine the type of entity to spawn has been removed. Instead, all spawn eggs will now use the "EntityTag" tag (which was originally restricted to "minecraft:armor_stand" items in 1.8) as well as the "id" tag within it.

/give @p minecraft:spawn_egg 1 0 {EntityTag:{id:"Creeper"}}

The main feature of "EntityTag" is to merge data within it to the specified entity when created. For example, the following creeper will explode instantly.

/give @p minecraft:spawn_egg 1 0 {EntityTag:{id:"Creeper",Fuse:0}}

Entity: Player

"DataVersion" (integer)

"DataVersion" is a numerical value that states which version the player is playing within. While it cannot be changed via commands, it can be tested for:

With the introduction of the "Passengers" tag, this new compound holds a copy of the entity the player is currently riding. "AttachLeast" and "AttachMost" are the UUIDLeast and UUIDMost of that entity, while "Entity" holds the actual data.

"Item" (compound)

Entity: SpectralArrow

"SpectralArrow" is a brand new entity that will apply the "glowing" potion effect to the target.

"Duration" (integer)

The "Duration" tag specifies how long the effect will last when the arrow strikes the target.

/summon SpectralArrow ~ ~5 ~ {Duration:200}

Entity: Shulker

"Shulker" is a brand new entity that has the appearance of a block. It inherits the same data that other hostile mobs do.

"Peek", "AttachFace", "APX/APY/APZ"

Peek (byte) - Percentage height of its head when peeking, up to 100.

AttachFace (byte) - Determines the direction the shulker has attached to a block. Summoning shulkers by default will make it attach accordingly, but you can change it manually.

APX, APY, APZ (int) - Set of exact coordinates that the Shulker should be located at. Shulkers mimic blocks, so this is used to keep them within an exact block space. Summoning with this will override the coordinates in /summon.

Entity: ShulkerBullet

"ShulkerBullet" is a brand new entity that is shot by Shulkers. It directly extends the "Entity" class rather than "Projectile".

Entity: Fireball, DragonFireball, SmallFireball, WitherSkull

"direction" (list/double)

The old "direction" tag now requires exactly 3 internal Doubles to be listed in order for the entity to be summoned (no more or less).

/summon Fireball ~ ~1 ~ {direction:[0.0,0.0,0.0]}

"power" (list)

The "power" tag, like "direction", is a new list of 3 Doubles that determine which direction to shoot in. Unlike "direction" however, the motion does not consider air resistance, causing the fireball to endlessly move in that specified direction. "direction" is still required, but can be set to 0.

"life" (integer)

The new "life" tag, as far as I could tell, is supposed to kill the fireball when it reaches 600 after having been stuck inside a block. Unfortunately I cannot seem to get it to work, even by letting it naturally happen.

Entity: Zombie

"VillagerProfession" (integer)

Specifies the profession the zombie villager will be presented as, as well as become when cured.

/summon Zombie ~ ~1 ~ {IsVillager:1b,VillagerProfession:3}

Entity: MinecartHopper

"LootTable" (string)

Determines which loot table will be used when the inventory is opened or destroyed.

"Enabled" (byte)

This new boolean tag determines whether or not the minecart hopper will pick up items into its inventory. Intended as a fix for MC-88098.

/summon MinecartHopper ~ ~1 ~ {Enabled:1b}

Entity: EntityHorse

"SkeletonTrap" (byte)

This new boolean tag determines whether or not the horse will spawn 4 undead horsemen in its place when a player gets within 10 blocks of it.

/summon EntityHorse ~ ~1 ~10 {SkeletonTrap:1b}

"SkeletonTrapTime" (integer)

This value increments once per tick so long as "SkeletonTrap" is set to 1. Once this value reaches 18000, the horse will automatically despawn. This will prevent the hostile horses from overflowing the world, similar to chicken jockeys.

/summon EntityHorse ~ ~1 ~10 {SkeletonTrap:1b,SkeletonTrapTime:17980}

Entity: PrimedTnt

"Fuse" (byte -> short)

The "Fuse" tag is no longer stored as a byte (-128 to 127), having been raised to a short (-32768 to 32767).

Tile: All Command Blocks

Includes content for the new "Repeating" and "Chain" command blocks. I have a thread here containing further information.

"powered" (byte)

All command blocks now have the "powered" tag associated with them, stating whether or not the block is currently receiving a redstone signal. While it can be detected for all command blocks, only the "chain_command_block" can functionally have theirs changed to 1.

/blockdata X Y Z {powered:1b}

"auto" (byte)

When set to 1, the command block will no longer require a redstone signal in order to activate. When applied to an Impulse block, its command will activate once. When applied to a Repeat block, it will activate every tick as expected. When applied to Chain blocks, they will not require a redstone signal to activate their command.

/blockdata X Y Z {auto:1b}

"conditionMet" (byte)

States whether or not the command block behind the conditional command block was successful in output. Will be 1 if that block is successful and 0 if unsuccessful. Non-conditional command blocks will always be 1.

/testforblock X Y Z minecraft:command_block -1 {conditionMet:1b}

"conditional" (byte)

Introduced as well as removed during snapshots, replaced by blockstates (requires using the Damage value for the /setblock and /fill commands).

When set to 1, command blocks that are "conditional" will only activate their command if the command block behind them was successful in execution. For Repeating command blocks, they will not send off a repeated signal if the command block behind them was unsuccessful.

I literally just wanted to try out the Shulker team thing and the first solution ended up being the right one (that never happens). I actually assumed that was the only way to put mobs on a team (faster than the other method anyways).

I literally just wanted to try out the Shulker team thing and the first solution ended up being the right one (that never happens). I actually assumed that was the only way to put mobs on a team (faster than the other method anyways).

Haha, that's a very good guess then.

I've also added the "Glowing" byte tag under "Entities" at the top. Just a minor tag.

I was wondering if you can work out the new Attribute Modifier tags for items. Previously, attributes such as generic.movementSpeed and generic.maxHealth applied whether they were equipped as armor or held in your hand. Now, items say in the ingame tooltip which slot the item has to be for the attributes to apply i.e. "When in main hand:", "When in off hand:", "When on feet:", etc.

I was wondering if you can work out the new Attribute Modifier tags for items. Previously, attributes such as generic.movementSpeed and generic.maxHealth applied whether they were equipped as armor or held in your hand. Now, items say in the ingame tooltip which slot the item has to be for the attributes to apply i.e. "When in main hand:", "When in off hand:", "When on feet:", etc.

It can be presumed that tags can be used for items to specify which slot applies a specific attribute modifer e.g. +10% Speed in Main Hand and +5% Speed in Off Hand.

What tags are needed to do so?

I can't say for certain, but from what I know, the list of different slots is automatically written and there are no extra tags at this time. Hidden modifiers on normal tools don't prompt this listing to occur since it appears to be triggered by the existence of the "AttributeModifiers" tag. We will likely see this built upon in the upcoming snapshots.

Hey, so what is the equipment slot for the off-hand slot? I was going to make a glider of some sort dependant on a feather in the off hand, but i need to know the slot first.

For players it would be "Slot:-106b", but that's very subject to change since there are currently some problems with slots and commands. But for the "HandItems" tag for mobs, without the "Slot" tag we cannot detect what is in a particular slot in the list at all (same issue with the "Equipment" tag and list detecion).

All I'm seeing in the source so far is the list of attributes being displayed on the item, but no specific reference on restricting where to apply attributes (no new tags or changes to existing tags that I could find easily). Looks to be an incomplete feature, unless you have further details.

The shulker's "Peek" tag is a percentage, a value of 100 is equivalent to one block out. values above 100 (below 0) will cause the shulker to visually start to retract (extend), but the collision box will function correctly.

This new block will teleport any entity that comes in contact with it to a specified set of coordinates. It works in the same manner as /spreadplayers in that it will force the player to be at the topmost block. The target chunks will also be loaded when the entity travels through. The ExitPortal compound tag holds the X, Y, and Z integer tags.

The Life long tag, as far as I've found so far, is only relevant between values 0 and 200 and increases once per tick. Between those values, a purple beacon beam emits from the block. Afterwards, "Life" seems unused. Let me know if there are other ranges used.

/setblock ~ ~1 ~ minecraft:end_gateway 0 replace {Life:190}

Is there/ can you check to see if there is nbt data for the beacon color of the end gateway? I know it is purple if you travel though it and lime green/ yellow in another entity is thrown through it.

Rollback Post to RevisionRollBack

I have a small YouTube channel and would greatly appreciate it if you were to check me out!!

The shulker's "Peek" tag is a percentage, a value of 100 is equivalent to one block out. values above 100 (below 0) will cause the shulker to visually start to retract (extend), but the collision box will function correctly.

The tellraw command is changed to where EVERYTHING had to be in quotation now or else it gives an error.

/tellraw @a {text:"hi",color:green}

Needs to be typed in as:

/tellraw @a {"text":"hi","color":"green"}

I'll be surprised if this is completely intentional as it breaks backwards compatibility greatly. I'll wait and see what the response is on some bug reports. It may have been a temporary solution to 15w31a's issues, since 15w31a makes worlds unusable after reloading a few times.

I'll be surprised if this is completely intentional as it breaks backwards compatibility greatly. I'll wait and see what the response is on some bug reports. It may have been a temporary solution to 15w31a's issues, since 15w31a makes worlds unusable after reloading a few times.

There's no NBT stored but checking the source tells me it switches between the "magenta" dye and "yellow" dye. Color codes are 11685080 and 15066419 respectively.

In the changelog for 15w31a on minecraft wiki, it said something about changing JSON to strict. Also, many users are claiming that this is intentional.

EDIT: If this is a temporary workaround, then why did Mojang not tell us?

In the changelog for 15w31a on minecraft wiki, it said something about changing JSON to strict. Also, many users are claiming that this is intentional.

EDIT: If this is a temporary workaround, then why did Mojang not tell us?

The wiki is not run by Mojang and will still have inaccurate information. I have not seen Mojang clearly state one way or another what is or isn't temporary or intentional for commands. Just because they did not say one thing does not mean they said another. If you have a link to something they themselves have said, rather than what somebody is speculating, could you provide it?

The JSON text component is parsed on a lenient basis. Ideally all cases of the text component with commands should work in the same manner, yet this shows it does not. What it doesn't say is what is the intended method is, and without word from Mojang we cannot fill in that blank without speculation.