Minecraft nbt tags

Minecraft nbt tags DEFAULT
NBT Tag Description Allowed tagnames Required tagnames Syntax TileEntityData Used 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, EntityID None TileEntityData:{} Motion Determines 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. X, Y, Z All Motion:[X,Y,Z] direction Similar 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.

X, Y, Z All direction:[X,Y,Z] power Similar 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. X, Y, Z All power:[X,Y,Z] ActiveEffects Sets the effects that apply to a mob after it is summoned. Type 999999 to apply its countdown to infinity. It should hide its numbers to *. Id, Duration, Amplifier, Ambient, ShowParticles All ActiveEffects:[{Id:,Duration:,Amplifier:,Ambient:,ShowParticles:,ShowIcon:},{Id:,Duration:,Amplifier:,Ambient:,ShowParticles:,ShowIcon:}] rewardExp Controls villagers giving xp for trading, set to true or false. Normally, villagers can reward you experience orbs. True/False {rewardExp:true/false} Passengers Sets 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:},{id:},etc.] ArmorItems Defines what items are being worn by the mob. Items go in slots Feet, Legs, Chest, Head, in that order. Item None ArmorItems:[{Count:#,id:""},{Count:#,id:""},{Count:#,id:""},{Count:#,id:""}] HandItems Defines what item is within the mainhand and offhand. First item is the mainhand, second is offhand. Item None HandItems:[{Count:#,id:""},{Count:,id:#}] HandDropChances Determines 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:[0.1f,2.0f]} ArmorDropChances Determines 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:[0.1f,2.0f,1.0f,0.0f]} NoAI Makes 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:0b} or {NoAI:1b} NoGravity Makes mobs unaffected by gravity. Mobs do not fall. Mobs cannot walk in the air. {NoGravity:0b} or {NoGravity:1b} Silent Makes mobs silent. Does not work for certain sounds, see MC-64242. {Silent:0b} or {Silent:1b} Fire Determines 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:1} to {Fire:32767} Invulnerable Makes mobs invulnerable to everything except the Void and players in Creative Mode. Mobs do not attack or run away from invulnerable mobs. {Invulnerable:1} Attributes Customizes the attributes of the entity. See Attribute for more details Name: 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:"generic.max_health",Base:40,Modifiers:[{Name:generic.max_health, Amount:7,Operation:0,UUID:8000}]. Health Number of hearts (for hearts above the default maximum you must change the base value of the 'generic.max_health' attribute). All Mobs Number in half hearts {Health:#} Anger A pigman becomes aggressive toward any player nearby (as if you hit it). Summoning Zombie Pigmans and Endermans Number in ticks {Anger:#} CustomName Summons a mob with a name that appears above their head.All Mobs A JSON Text component {CustomName:"\"Custom Name\""} or you can use {CustomName:'{"text":"text","color":"colorname",...}'} CustomNameVisible Alters 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 Mobs Byte, 0b or 1b {CustomNameVisible:#} PersistenceRequired Mobs are undisappearable on time. Tamed animals without commands can also evolve this action. All Mobs True/False {PersistenceRequired:1} or {PersistenceRequired:0}
Sours: https://minecraft.fandom.com/wiki/Tutorials/Command_NBT_tags
258inv.pngThis article or section requires a cleanup in order to meet the Minecraft Wiki's quality standards.
Please edit this page to improve it.
Many NBT tags have changed since the 1.13 update. Work is being done to clean up this page. Feel free to join in
258inv.png

NBT tags are used to specify information for items and entities created with the "", "", "" (for the JSON message), "", "{Until 1.13}", "", and "" commands.

Each Tag has the format . Tag names are case-sensitive. The payloads of List Tags are enclosed in square brackets , with each additional unnamed Tag separated by a comma. The payloads of Compound Tags are enclosed in braces , with each additional Named Tag separated by a comma - Note that the entire entity data tag is itself an unnamed Compound Tag.

You can find a lot of tag names, especially in entities and block entities by using the "orcommand.

How To Get Them?

To get the NBT tag of a specific entity (for example, creeper), you use the command to get the full data of the creeper itself. For more specific selectors, see Commands

Tag Basics

Structure of a Tag

First off, each tag has three parts:

(byte, 0-12)
(TAG_String)

When using commands, the is figured out based on the given , and the payload is what follows the colon - basically its value. The payload ought to fit the expected syntax. So a tag expecting an integer will not accept a string.

Number types can be denoted with a letter at the end of the value (such as for a byte). Without a letter, the code assumes an integer, which works fine for most numbers but behaves differently. Using a literal integer like this to exceed a type's expected range simply wraps the number back to 0 at the limit.

Tag Types

TAG_End
Unnamed, no payload, unusable in commands. Used in data storage to mark the end of TAG_Compound.
TAG_Byte
Payload: A single signed byte (8 bits)
Ranges from to . Used for many booleans.
In Commands: or
TAG_Short
Payload: A single signed short integer (2 bytes, big endian)
Ranges from to
In Commands: or
TAG_Int
Payload: A single signed integer (4 bytes, big endian)
Ranges from to
In Commands: A literal number without a decimal
TAG_Long
Payload: A single signed long integer (8 bytes, big endian)
Ranges from to
In Commands: or
TAG_Float
Payload: A floating-point number (4 bytes, big endian, IEEE 754-2008, single precision)
Maxes around , or
In Commands: or , decimal or no decimal
TAG_Double
Payload: A floating-point number (8 bytes, big endian, IEEE 754-2008, double precision)
Maxes around , or
In Commands:, , or a decimal number
TAG_Byte_Array
Payload: Unnamed TAG_Int (length), then an array of bytes of unspecified format. The length of this array is bytes.
In Commands:
( is determined by the length of the given array)
TAG_String
Payload: Unnamed TAG_Short (length), then an array of bytes of length defining a string in UTF-8 format.
In Commands:
( is determined by the length of the given text)
Note that as is usual with most strings, if quotes are to be included within the string, escape codes () must be used for the inner quotes in commands.
TAG_List
Payload: Unnamed TAG_Byte (tagId), unnamed TAG_Int (length), then a sequential list of unnamed Tags of type . The length of this array is Tags.
In Commands:
( is determined by the length of the given list)
TAG_Compound
Payload: A sequential list of unique Named Tags. This array is terminated by a TAG_End.
Nested Compound Tags are terminated by their own internal End Tags.
In Commands:
(The terminating TAG_End is irrelevant to command usage)
TAG_Int_Array
Payload: Unnamed TAG_Int (size), then an array of unnamed TAG_Ints. The length of this array is Tags.
An array of integers.
In Commands:
( is determined by the size of the given array)
TAG_Long_Array
Payload: Unnamed TAG_Int (size), then an array of unnamed TAG_Longs. The length of this array is Tags.
In Commands: Used as
( is determined by the size of the given array)

Tag Payloads

The payload is the data a Tag carries. It might be a number or, in the case of Compound Tags and List Tags, other Tags. In using commands, one simply needs to avoid mismatching expected data types, keep values within expected ranges, and close all brackets and braces that are opened.

For a deeper understanding of payloads, it might help to look at what an example Compound Tag would look like in data.

This is understood in the following way. Recall that all named tags have a (1 byte), a (Unnamed TAG_String), and a payload.

  • The first byte of data read is the . Above is , so this represents a TAG_Compound. The next two bytes read are the length of its name. (Two bytes because it expects a short - see Structure of a Tag above.) The given length is . Those next 3 bytes read . So far it's been revealed that the first Tag is a Compound Tag named "ham". Its payload is everything that follows, until TAG_End.
    • The next byte is , so this is a TAG_String. The upcoming unnamed TAG_String tells us it has the 7-byte name of "pigName". Its payload follows.
      • The next short is , so the "pigName" has a value that's 6 bytes long. Those bytes read . The completed first Tag is
    • The next byte is , so next is a TAG_Int. It has the 5-byte name of "value". Its payload follows in the next 4 bytes: . The next completed Tag is
    • The next byte is , so next is a TAG_End.

The completed Compound Tag is as follows:

TAG_Compound("ham"): TAG_String("pigname"): 6 Hampus, TAG_Int("value"): 120, TAG_End

Using a command to summon a pig with this example tag would look like this:

/summon minecraft:pig ~ ~ ~ {ham:{pigname:"Hampus",value:120}}

List of Entity Data Tags

Minecraft code spawns entities with set Tags and values. Entities are themselves saved as tags within the world's chunk data. Every detail about an entity is stored in its data tag. All tags are referenced by the game's code to control entity behaviour.

The following tags are common to all entities.

Entity ID.
Three doubles describe current X, Y, Z position of entity
Three doubles describe the current dX, dY, dZ velocities of entity (in metres per tick)
Two floats describe entity's rotation in degrees
  • First float is clockwise rotation around the Y axis, with 0° facing in the positive Z direction, or due south. Ranges from 0.0 to 360.0
  • Second float is declination from the horizon. Ranges from -90.0 (upwards) to +90.0 (downwards)
Distance entity has fallen. Fall damage taken scales with this number. 0 for any entity at rest
Ticks until a burning entity's fire ends. Negative values are how many ticks an entity can stand in fire before burning. -20 for an entity not on fire
Ticks until an entity runs out of air while underwater. While this value is 0 and the entity is underwater, it takes damage. Fills to 300 for any entity above water
0 for false, 1 for true. True when the entity is touching the ground
0 for false, 1 for true. If true, entity is unaffected by gravity and stops changing Y position
0 for the Overworld, -1 for the Nether, and 1 for the End. Only known to be used for player data
0 for false, 1 for true. When true, mobs don't take damage from any source and cannot be moved by force. Objects like item frames cannot be destroyed unless a supporting block is removed
Number of ticks until the entity may teleport through a nether portal. Starts at 300 ticks
The most significant 64 bits of this entity's Universally Unique Identifier (UUID).
The least significant 64 bits of this entity's Universally Unique Identifier (UUID).
The entity's custom name string.
In Minecraft Java Edition 1.14, must itself have quotes, as well as the standard quotes that go around strings. This means that escape codes are needed for the inner ones, so syntax looks like the following, (if one is to name an entity Gerald).
Another way that this works is by setting it to an apparent compound tag specifying a block of text, done this way:
0 for false, 1 for true. If true, this entity's custom name always appears above its head, whether or not the player is looking at it.
0 for false, 1 for true. If true, this entity is silent.
Data for the entity riding this entity.
-0 for false, 1 for true. When true, the entity has a cartoonish, glowing outline.
List of custom data.

Mobs

The following tags are common to all mobs

Amount of health an entity has.
Amount of additional, temporary health added by the Absorption status effect.
Set to 10 when a mob is struck, colouring it red. Decreases by 1 per tick until 0, when the mob turns normal colour again.
Timestamp in the mob's life when it was last damaged, measured in ticks since its creation.
Number of ticks since the mob's death. 0 for any living mob.
0 for false, 1 for true. When true and the mob is wearing the elytra, they'll glide.
List of Attributes for a mob.
Attribute Tags
Given name for the Attribute. Might be or .
-
List of modifiers acting on the Attribute.
Modifier Tags
-
-
-
-
-
List of potion effects.
Effect Tags
-
-
-
-
-
-
Describes items the entity is holding. These Compound Tags have Tags Common to All Items. is discluded.
: The item held in the mob's main hand.
: The item held in the mob's off-hand.
What the entity is wearing. These Compound Tags have Tags Common to All Items. is discluded.
: The item worn on the feet.
: The item worn on the legs.
: The item worn on the chest.
: The item worn on the head.
-
-
-
-
-
-
-
-
-
-
-

Mobs That Breed

Mobs that can breed include Cows, Chickens, Pigs, Sheep, Villagers, Cats, and Dogs.
Counts down number of ticks until this mob stops searching for a mate. Default 0 for a mob not doing so.
Age of the mob in ticks. When less than 0 and counting up, represents a baby mob. Adult mobs use this value to count down how many ticks until it can breed again.
Least significant bits of the UUID for the entity that caused this animal to breed
Most significant bits of the UUID for the entity that caused this animal to breed

Mobs That Raid

Coming Soon

Specific Mobs

The following lists are specific to each mob

Entity ID.
Three doubles describe current X, Y, Z position of entity
Three doubles describe the current dX, dY, dZ velocities of entity (in metres per tick)
Two floats describe entity's rotation in degrees
  • First float is clockwise rotation around the Y axis, with 0° facing in the positive Z direction, or due south. Ranges from 0.0 to 360.0
  • Second float is declination from the horizon. Ranges from -90.0 (upwards) to +90.0 (downwards)
Distance entity has fallen. Fall damage taken scales with this number. 0 for any entity at rest
Ticks until a burning entity's fire ends. Negative values are how many ticks an entity can stand in fire before burning. -20 for an entity not on fire
Ticks until an entity runs out of air while underwater. While this value is 0 and the entity is underwater, it takes damage. Fills to 300 for any entity above water
0 for false, 1 for true. True when the entity is touching the ground
0 for false, 1 for true. If true, entity is unaffected by gravity and stops changing Y position
0 for the Overworld, -1 for the Nether, and 1 for the End. Only known to be used for player data
0 for false, 1 for true. When true, mobs don't take damage from any source and cannot be moved by force. Objects like item frames cannot be destroyed unless a supporting block is removed
Number of ticks until the entity may teleport through a nether portal. Starts at 300 ticks
The most significant 64 bits of this entity's Universally Unique Identifier (UUID).
The least significant 64 bits of this entity's Universally Unique Identifier (UUID).
The entity's custom name string.
In Minecraft Java Edition 1.14, must itself have quotes, as well as the standard quotes that go around strings. This means that escape codes are needed for the inner ones, so syntax looks like the following, (if one is to name an entity Gerald).
Another way that this works is by setting it to an apparent compound tag specifying a block of text, done this way:
0 for false, 1 for true. If true, this entity's custom name always appears above its head, whether or not the player is looking at it.
0 for false, 1 for true. If true, this entity is silent.
Data for the entity riding this entity.
-0 for false, 1 for true. When true, the entity has a cartoonish, glowing outline.
List of custom data.
Amount of health an entity has.
Amount of additional, temporary health added by the Absorption status effect.
Set to 10 when a mob is struck, colouring it red. Decreases by 1 per tick until 0, when the mob turns normal colour again.
Timestamp in the mob's life when it was last damaged, measured in ticks since its creation.
Number of ticks since the mob's death. 0 for any living mob.
0 for false, 1 for true. When true and the mob is wearing the elytra, they'll glide.
List of Attributes for a mob.
Attribute Tags
Given name for the Attribute. Might be or .
-
List of modifiers acting on the Attribute.
Modifier Tags
-
-
-
-
-
List of potion effects.
Effect Tags
-
-
-
-
-
-
Describes items the entity is holding. These Compound Tags have Tags Common to All Items. is discluded.
: The item held in the mob's main hand.
: The item held in the mob's off-hand.
What the entity is wearing. These Compound Tags have Tags Common to All Items. is discluded.
: The item worn on the feet.
: The item worn on the legs.
: The item worn on the chest.
: The item worn on the head.
-
-
-
-
-
-
-
-
-
-
-
0 when flying, 1 for when resting upside-down.
Template:Data Tags/blaze
Template:Data Tags/cat
Template:Data Tags/cave spider
Template:Data Tags/chicken
Template:Data Tags/cow
Entity ID.
Three doubles describe current X, Y, Z position of entity
Three doubles describe the current dX, dY, dZ velocities of entity (in metres per tick)
Two floats describe entity's rotation in degrees
  • First float is clockwise rotation around the Y axis, with 0° facing in the positive Z direction, or due south. Ranges from 0.0 to 360.0
  • Second float is declination from the horizon. Ranges from -90.0 (upwards) to +90.0 (downwards)
Distance entity has fallen. Fall damage taken scales with this number. 0 for any entity at rest
Ticks until a burning entity's fire ends. Negative values are how many ticks an entity can stand in fire before burning. -20 for an entity not on fire
Ticks until an entity runs out of air while underwater. While this value is 0 and the entity is underwater, it takes damage. Fills to 300 for any entity above water
0 for false, 1 for true. True when the entity is touching the ground
0 for false, 1 for true. If true, entity is unaffected by gravity and stops changing Y position
0 for the Overworld, -1 for the Nether, and 1 for the End. Only known to be used for player data
0 for false, 1 for true. When true, mobs don't take damage from any source and cannot be moved by force. Objects like item frames cannot be destroyed unless a supporting block is removed
Number of ticks until the entity may teleport through a nether portal. Starts at 300 ticks
The most significant 64 bits of this entity's Universally Unique Identifier (UUID).
The least significant 64 bits of this entity's Universally Unique Identifier (UUID).
The entity's custom name string.
In Minecraft Java Edition 1.14, must itself have quotes, as well as the standard quotes that go around strings. This means that escape codes are needed for the inner ones, so syntax looks like the following, (if one is to name an entity Gerald).
Another way that this works is by setting it to an apparent compound tag specifying a block of text, done this way:
0 for false, 1 for true. If true, this entity's custom name always appears above its head, whether or not the player is looking at it.
0 for false, 1 for true. If true, this entity is silent.
Data for the entity riding this entity.
-0 for false, 1 for true. When true, the entity has a cartoonish, glowing outline.
List of custom data.
Amount of health an entity has.
Amount of additional, temporary health added by the Absorption status effect.
Set to 10 when a mob is struck, colouring it red. Decreases by 1 per tick until 0, when the mob turns normal colour again.
Timestamp in the mob's life when it was last damaged, measured in ticks since its creation.
Number of ticks since the mob's death. 0 for any living mob.
0 for false, 1 for true. When true and the mob is wearing the elytra, they'll glide.
List of Attributes for a mob.
Attribute Tags
Given name for the Attribute. Might be or .
-
List of modifiers acting on the Attribute.
Modifier Tags
-
-
-
-
-
List of potion effects.
Effect Tags
-
-
-
-
-
-
Describes items the entity is holding. These Compound Tags have Tags Common to All Items. is discluded.
: The item held in the mob's main hand.
: The item held in the mob's off-hand.
What the entity is wearing. These Compound Tags have Tags Common to All Items. is discluded.
: The item worn on the feet.
: The item worn on the legs.
: The item worn on the chest.
: The item worn on the head.
-
-
-
-
-
-
-
-
-
-
-
0 is false, 1 is true. If set to true, this creeper is lightning-charged
0 is false, 1 is true. If true, this creeper has been ignited by Flint and Steel
Determines the explosive radius if the creeper explodes. Default is 3
Determines the time in ticks the creeper will hiss before exploding. Default is 30
Template:Data Tags/dolphin
Template:Data Tags/donkey
Template:Data Tags/drowned
Template:Data Tags/elder guardian
Template:Data Tags/enderman
Template:Data Tags/endermite
Template:Data Tags/evoker
Template:Data Tags/ghast
Template:Data Tags/giant
Template:Data Tags/guardian
Template:Data Tags/horse
Template:Data Tags/husk
Template:Data Tags/illager beast
Template:Data Tags/ocelot
Sours: https://minecraft-archive.fandom.com/wiki/NBT_Tags
  1. Camping santiam river oregon
  2. Near death note
  3. Simonton elementary
  4. 500mg spirulina

NBT Tags for Player in Minecraft (Java Edition 1.16)

NBT TagValue (Description)abilities

data (The abilities that the the player has.)

  • invulnerable - determines whether the player take damage like normal (0 or 1)
  • mayfly - determines whether the player can fly (0 or 1)
  • instabuild - demeterines whether the player can instantly place or destroy blocks (0 or 1)
  • walkSpeed - the speed that the player can walk (default is 0.1f)
  • mayBuild - determines whether the player is allowed to build by placing or destroying block (0 or 1)
  • flying - the player is currently flying (0 or 1)
  • flySpeed - the speed that the player can fly (default is 0.05f)

Example
{abilities:{invulnerable:1,mayfly:1,instabuild:1,walkSpeed:0.1f,mayBuild:1,flying:0,flySpeed:0.05f}}

AbsorptionAmount

number (The number of absorption health points the player has)

Example
{AbsorptionAmount:2.0f}

Air

ticks (The number of game ticks the player has air left for)

Example
{Air:300s}

DataVersion

version (The version of the player's NBT structure. Each version/snapshot of Minecraft has its own unique version number. Minecraft 1.16 rc-1 has a DataVersion value of 2565)

Example
{DataVersion:2565}

DeathTime

number (The number of game ticks that the player has been dead. When alive, DeathTime has a value of 0)

Example
{DeathTime:0}

Dimension

minecraft:the_nether (The player is the Nether)
minecraft:overworld (The player is in the Overworld)
minecraft:the_end (The player is in the End)

Example
{Dimension:"minecraft:the_nether"}

EnderItems

data (An item in the player's ender chest)

Example
{EnderItems:[{id:"minecraft:diamond_sword"}]}

enteredNetherPosition

coordinate (The xyz coordinate value where the player entered the Nether dimension)

Example
{enteredNetherPosition:{x:-259.888617739718d,y:65.16610926093821d,z:185.8149890186918d}}

FallDistance

number (The distance that the player has fallen)

Example
{FallDistance:0.0f}

FallFlying

0 (The player is not allowed to use elytra when falling)
1 (The player is allowed to use elytra when falling)

Example
{FallFlying:1}

Fire

ticks (The number of game ticks until the player is no longer on fire - there are 20 ticks in a second. When the player is not on fire, the default is -20)

Example
{Fire:-20s}

foodLevel

number (The level in the Hunger bar. A full Hunger bar has a value of 20)

Example
{foodLevel:20}

foodExhaustionLevel

number (The level of exhaustion)

Example
{foodExhaustionLevel:0}

foodSaturationLevel

number (The current level of saturation)

Example
{foodSaturationLevel:5}

foodTickTimer

ticks (The value of the Food timer in game ticks)

Example
{foodTickTimer:0}

Health

number (The number of health points the player has)

Example
{Health:20.0f}

HurtTime

ticks (The number of game ticks that the player turns red after being hurt)

Example
{HurtTime:0}

Inventory

data (An item in the player's inventory)

Example
{Inventory:[{id:"minecraft:diamond_sword"}]}

Invulnerable

0 (The player will take damage like normal)
1 (The player will not take any damage from attacks or physical surroundings)

Example
{Invulnerable:0}

OnGround

0 (The player is not on the ground)
1 (The player is on the ground)

Example
{OnGround:1}

playerGameType

0 (The player is in Survival mode)
1 (The player is in Creative mode)
2 (The player is in Adventure mode)
3 (The player is in Spectator mode)

Example
{playerGameType:1}

PortalCooldown

ticks (The number of game ticks until the player can go through a portal again - there are 20 ticks in a second)

Example
{PortalCooldown:120}

Pos

coordinate (The xyz coordinate value where the player is currently positioned)

Example
{Pos:{x:-255.888617739718d,y:66.16610926093821d,z:186.8149890186918d}}

previousPlayerGameType

0 (The player was previously in Survival mode)
1 (The player was previously in Creative mode)
2 (The player was previously in Adventure mode)
3 (The player was previously in Spectator mode)

Example
{previousPlayerGameType:3}

recipeBook

data (A list of the recipes the player knows how to craft)

Example
{recipeBook: {recipes:["minecraft:diamond_sword"]}}

SelectedItem

data (The item that is currently selected in the hotbar)

Example
{SelectedItem:{id:"minecraft:diamond_sword",Count:1b}}

Score

number (The value that will be displayed as the Score when the player dies)

Example
{Score:126}

seenCredits

0 (The player has not yet gone into the final portal that ends the game and seen the credits)
1 (The player has gone into the final portal that ends the game and has seen the credits)

Example
{seenCredits:0}

selectedItemSlot

0 (The player has the slot #1 selected in the hot bar)
1 (The player has the slot #2 selected in the hot bar)
2 (The player has the slot #3 selected in the hot bar)
3 (The player has the slot #4 selected in the hot bar)
4 (The player has the slot #5 selected in the hot bar)
5 (The player has the slot #6 selected in the hot bar)
6 (The player has the slot #7 selected in the hot bar)
7 (The player has the slot #8 selected in the hot bar)
8 (The player has the slot #9 selected in the hot bar)

Example
{selectedItemSlot:0}

ShoulderEntityLeft

data (The entity sitting on the player's left shoulder. Currently, this can only be a parrot)

Example
{ShoulderEntityLeft:{id:"minecraft:parrot"}}

ShoulderEntityRight

data (The entity sitting on the player's right shoulder. Currently, this can only be a parrot)

Example
{ShoulderEntityRight:{id:"minecraft:parrot"}}

SleepingX

number (The X coordinate of where the player is sleeping)

Example
{SleepingX:-851}

SleepingY

number (The Y coordinate of where the player is sleeping)

Example
{SleepingY:66}

SleepingZ

number (The Z coordinate of where the player is sleeping)

Example
{SleepingZ:193}

SleepTimer

ticks (The number of game ticks that the player has been sleeping in a bed)

Example
{SleepTimer:2400}

SpawnDimension

minecraft:the_nether (The player will spawn in the Nether)
minecraft:overworld (The player will spawn in the Overworld)
minecraft:the_end (The player will spawn in the End)

Example
{SpawnDimension:"minecraft:overworld"}

SpawnForced

0 (The player will not spawn if no bed is found)
1 (The player will spawn if no bed is found)

Example
{SpawnForced:0}

SpawnX

number (The X coordinate of the player's bed or spawn point)

Example
{SpawnX:520}

SpawnY

number (The Y coordinate of the player's bed or spawn point)

Example
{SpawnY:97}

SpawnZ

number (The Z coordinate of the player's bed or spawn point)

Example
{SpawnZ:101}

XpLevel

number (The level on the experience bar)

Example
{XpLevel:20}

XpP

number (The percentage on the experience bar until the next level)

Example
{XpP:50}

XpSeed

number (The seed that will be used for the next enchantment when using an enchanting table)

Example
{XpSeed:238209655}

XpTotal

number (The total XP earned during the current life. This value is displayed as the Score when player dies)

Example
{XpTotal:126}

Sours: https://www.digminecraft.com/data_tags/player.php
Minecraft TAG Command Tutorial [1.16/1.17]

The "tag=" nbt tag in minecraft selector

Very simple short and straightforward. I found that if I give myself firework_rockets with a custom tag called 'test', the item has an nbt={Tags:['test']}. The command I use is

However once the firework is shot via a crossbow, I tried to retrieve its data and to my surprise, found out that the Tags:['test'] is not stored directly in the entity, but more discretely in an nbt called tag=. For example: entity firework_rocket has the following data ---

As seen from above, this Tags:["test"] tag in being stored in an nbt tag called tag. If I want to detect a specific nbt tag such as the Air tag, I could do so simply with

But what I want to do here is to detect the Tags:["test"] tag. simply wont work.

Can someone lend a helping hand plssss?

asked Sep 16 at 15:40

Sours: https://stackoverflow.com/questions/69211395/the-tag-nbt-tag-in-minecraft-selector

Tags minecraft nbt

Editing NBT Safely

  • 3 minutes to read

This article introduces you to "NBT editing" -- the use of tools to edit data strings stored in entities, items, and some blocks -- and how to avoid editing it in such a way that's likely to break in the future.

In this tutorial you will learn the following:

  • What NBT data is and how it is used.
  • Why NBT data might need to be edited.
  • Best practices for editing NBT data.

Requirements

It’s recommended that the following be completed before beginning this tutorial.

For years, it's been a common practice for Minecraft map makers to use external tools to edit "NBT," the data stored within entities, items, and some blocks that stores information such as names, damage values, or age. NBT is essentially a list of tags and corresponding values. For example, a zombie pigman would contain, among many others, an tag with a value of . Using tools such as MCEdit or MCCToolChest to edit NBT can have powerful results and save creators a great deal of time. For instance, you might use a tool to edit the name of a mob by simply changing the value of its tag rather than having to use a name tag and anvil in-game.

However, there are cases where NBT editing has led to problems when Minecraft updates in a way that changes how a particular tag is written or read by the game. Most features in Minecraft are built to be played, not edited with external tools. Those tools simulate playing the game. You could change a chest's content in game, and a tool such as MCCToolChest writes data to the NBT as if you had done just that. However, problems often arise when map makers use tools to edit NBT in a way that couldn't theoretically be accomplished in-game.

The golden rule is this: If you change things in a way that the game could never have written itself, you're at risk. If the game can't tell the difference between whether an NBT value was saved by the game itself or if it was hand-edited, you're generally safe.

Editing the NBT of a written book to change its text is fine; editing the NBT to exceed a book's in-game character limit isn't. Changing a cat's to makes it a Calico; Changing it to is probably a bad idea.

Minecraft's developers can only expect their code to be edited in the ways they programmed it to be edited. You may find that editing an NBT tag in a certain way allows you to do something cool, but there's no guarantee that how that tag is handled won't be changed in the future since it wasn't intended to be edited that way in the first place.

For example, map creators used to make custom villager trades by editing several of a villager's NBT tags. One such change was often setting the tag to a negative number so the villager would never unlock new trades like they do in survival Minecraft. Since Minecraft's developers never intended trades to work like that, they fundamentally changed the way the tag works in the "Village and Pillage" update, breaking many custom villagers in maps. Today, custom trades are typically handled using loot table functions, a feature developed specifically for such a purpose.

There's exceptions to this rule, which are usually due to years of creators editing NBT in a certain way in which Minecraft's developers had to build in support for them. For example, there's no way to write an item's tag in-game, but it's generally considered safe to do so in an editor.

This advice may extend to more than just NBT editing -- behaviors, commands, scripts, and other features of the game may all produce interesting results when you use them in a way they weren't intended. Minecraft is a living game and features are constantly being changed. While its developers clearly make every effort not to break your content, they can only be expected to know about the features they intentionally programmed. When creators rely on these unexpected "tricks," and content breaks because of it, a burden is placed on the creator, their players, and the Microsoft developers who have to try to find ways around it. When in doubt, always test your content on new updates to check for content-breaking changes.

Sours: https://docs.microsoft.com/en-us/minecraft/creator/documents/editingnbtsafely
How to Use the /summon Command and NBT Tags - Minecraft Custom Mobs Tutorial

.

You will also be interested:

.



475 476 477 478 479