Data component format

This article is about the format in Java Edition. For the legacy format, see Item format/Before 1.20.5. For the format in Bedrock Edition, see Item components.
"Component" redirects here. For the text format, see Text component format.
This feature is exclusive to Java Edition.
 

Data components, or simply components, are structured data used to define and store various properties. They are used on items, where they are referred as item components or item stack components, and block entities, partially replacing NBT format.

Data components are used in various places, including the player's inventory, container block entities and structure files.

Data components are namespaced identifiers, and can be of different data types, see § List of components.

For properties of items that are defined by code and cannot be modified through components, see Java Edition hardcoded item properties.

Usage

Command format

Data component can be used in the item_stack and item_predicate argument types.

In commands that take an item_stack argument, such as /give, items are represented in the format item_id[component1=value,component2=value], with component being the resource location of a component, and the value being the value of the component in SNBT format. Components can be removed by prefixing them with an exclamation mark, like item_id[!component3]. If no components are specified, the square brackets can be removed, leaving just the item ID. See item_stack for details.

In commands that take an item_predicate argument, such as /clear, items are represented in the format item_type[tests], with tests can be tests of data components or an item sub-predicate. See item_predicate for details.

Item format

For the legacy format before 1.20.5, see Item format/Before 1.20.5.

Every item type (item ID) has a set of default data components. Item stacks must specify an item ID, which implicity sets these default components, but they may be overriden by that individual item stack. Default components are not saved on individual item stacks.

When saved in the NBT format, items are written as a compound with the following tags:

  • [NBT Compound / JSON Object] The root tag.
    • [String] id: The resource location of the item. Must not be minecraft:air.
    • [Int] count: Number of items stacked in this inventory slot. Any item can be stacked, even if unstackable through normal means. Defaults to 1 if not specified.
    • [NBT Compound / JSON Object] components: Optional map of additional (non-default) data components.

In containers that do not use the data component format (such as container blocks and entity inventories), an additional [Byte] Slot tag is used to specify the slot the item is in e.g. {Slot:0b,id:"stone"}. This is not a part of the item stack format so is not present anywhere else where individual items are stored (such as single-slot containers, unstructured lists of items, etc.). In the data component format, slot numbers and item stacks are stored as separate fields e.g. {slot:0,item:{id:"stone"}}.

Block entity format

Main article: Block entity format

Block entities are stored in the NBT format. While they still use NBT tags for their individual properties, any non-default data components that exist on the item used to place the block will be saved.

Some NBT data on block entities are treated as data components when transfering data between items and blocks. For example, the Items field in a chest is interpreted as the minecraft:container component, despite being labeled and structured differently.

  • [NBT Compound / JSON Object] The root tag.
    • [String] id: Block entity ID
    • [Boolean] keepPacked: 1 or 0 (true/false) - If true, this is an invalid block entity, and this block is not immediately placed when a loaded chunk is loaded. If false, this is a normal block entity that can be immediately placed.
    • [Int] x: X coordinate of the block entity.
    • [Int] y: Y coordinate of the block entity.
    • [Int] z: Z coordinate of the block entity.
    • [NBT Compound / JSON Object] components: Optional map of data components.
    • Additional tags depending on the block entity ID. See Block entity format.

For example, if a chest was given to a player with the components minecraft:custom_data={foo:1} and minecraft:container=[{slot:0,item:{id:"stone"}}]], then placed the block on the ground, the block will be saved (omitting some fields) as:

{id:"minecraft:chest", Items:[{count:1,id:"minecraft:stone",Slot:0b}], components:{"minecraft:custom_data":{foo:1}}}

with minecraft:container saved as the Items tag, and minecraft:custom_data separated as it is not used by chest block entities.

List of components

attack_range

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:attack_range: Determines the attack range and hitbox margin of a weapon.
      • [Float] min_reach: The minimum distance in blocks from the attacker to the target to be considered valid. Defaults to 0.0, valid from 0.0 to 64.0.
      • [Float] max_reach: The maximum distance in blocks from the attacker to the target to be considered valid. Defaults to 3.0, valid from 0.0 to 64.0.
      • [Float] min_creative_reach: The minimum distance in blocks from the attacker to the target to be considered valid in Creative mode. Defaults to 0.0, valid from 0.0 to 64.0.
      • [Float] max_creative_reach: The maximum distance in blocks from the attacker to the target to be considered valid in Creative mode. Defaults to 5.0, valid from 0.0 to 64.0.
      • [Float] hitbox_margin: The margin applied to the target bounding box when checking for valid hitbox collision. Defaults to 0.3, valid from 0.0 to 1.0.
      • [Float] mob_factor: The multiplier applied to min_range and max_range when checking for valid distance if item is used by a mob. Defaults to 1.0, valid from 0.0 to 2.0.

Example: /give @s diamond[attack_range={max_reach:5.0}]

  • Gives a diamond that has an attack range of 5 blocks.

attribute_modifiers

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT List / JSON Array] minecraft:attribute_modifiers: A list of attribute modifiers which, if present on an item, may be applied to a player or mob that has equipped the item. If the item is not in the correct equipment slot, it has no effect. The modifiers are removed once the item is moved out of that slot or is deleted. Any attribute modifiers specified are listed in the item's tooltip.
      • [NBT Compound / JSON Object]: A single attribute modifier and its tooltip display type.
        • [String] type: The name of the attribute this modifier is to act upon.
        • [String] slot: The equipment slot/slots the item must be in for the modifier to take effect. Can be any, hand, armor, mainhand, offhand, head, chest, legs, feet, body, or saddle. Defaults to any. Note: any refers to any equipment slot, not any inventory slot.
        • [String] id: A namespaced ID to identify this modifier. It must be unique from other modifiers of the same attribute.
        • [Double] amount: Amount of change from the modifier.
        • [String] operation: Modifier operation. Can be add_value, add_multiplied_base, or add_multiplied_total. See Attribute Modifiers for info.
        • [NBT Compound / JSON Object] display: How the modifier is displayed in an item's tooltip. Optional.
          • [String] type: Display type. Can be default, hidden or override.
          • [NBT Compound / JSON Object][NBT List / JSON Array][String] value (only present if [String] type is override): A text component to show for this attribute modifier entry.

Example: /give @s stick[attribute_modifiers=[{type:"minecraft:scale",slot:"hand",id:"example:grow",amount:4,operation:"add_multiplied_base"}]]

  • Gives a stick that causes the player to grow 4x when holding it.

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT List / JSON Array] minecraft:banner_patterns: List of all patterns applied to the banner or the shield. If used on a shield and the minecraft:base_color component is not specified, then white is used as the base banner color.
      • [NBT Compound / JSON Object]: A single pattern.
        • [String] color: Dye color of the section.
        • [String][NBT Compound / JSON Object] pattern: One banner pattern (an [String] ID, or a new [NBT Compound / JSON Object] banner pattern definition).
          • A banner pattern see Template:Nbt inherit/banner pattern/template

Example: /give @s black_banner[banner_patterns=[{pattern:"triangle_top",color:"red"},{pattern:"cross",color:"white"}]]

  • Gives a black banner with a red triangle and white cross pattern.

base_color

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:base_color: The base dye color of the banner applied on a shield. If neither this nor minecraft:banner_patterns is specified, then the shield model will show its normal wooden texture. If the minecraft:banner_patterns component is specified but this component is not, then white is used as the base banner color. If present on a shield item, the item name is overridden as "<color> Shield" (e.g. if set to green, the name will be "Green Shield").

Example: /give @s shield[base_color="lime"]

  • Gives a lime shield.

bees

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT List / JSON Array] minecraft:bees: A list of the entities currently in the beehive or bee nest. If present, this component will add text to the item's tooltip that says how many entries are in the list (e.g. if there are two entries, the tooltip will say "Bees: 2 / 3"). Despite the tooltip suggesting there is a maximum of 3 entries, there is no limit to the size of this component.
      • [NBT Compound / JSON Object]: A single entity.
        • [NBT Compound / JSON Object] entity_data: Must include id tag. If the id is not minecraft:bee then the entity will never leave the hive. The Passengers, Pos, Rotation, and UUID tags are ignored when the bee spawns (the bee will always spawn in front of the hive with a random UUID, facing south, and without any passengers).
        • [Int] min_ticks_in_hive: The minimum amount of time in ticks for this entity to stay in the hive.
        • [Int] ticks_in_hive: The amount of ticks the entity has stayed in the hive.

Example: /give @s bee_nest[bees=[{entity_data:{id:"bee",CustomName:"Maya"},min_ticks_in_hive:60,ticks_in_hive:0}]]

  • Gives a bee nest containing a single bee named Maya, which exits the bee nest in 3 seconds.

block_entity_data

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:block_entity_data: Block entity NBT applied when this block is placed. Depending on the block type that this item places, and the block entity ID specified in this component, this component may add a red message to the item's tooltip warning the player that placing it may result in command execution.
      • See Block entity format. Must include id tag. Excludes x, y, z, components and keepPacked tags.

Example: /give @s spawner[block_entity_data={id:"mob_spawner",SpawnData:{entity:{id:"spider"}}}]

block_state

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:block_state: The block state properties to apply when placing this block. Regardless of the item type, if the honey_level property is specified then a gray "Honey: <honey_level> / 5" text is added to the tooltip.
      • [String] <block state>: A key-value pair, where the key is a block state key and the value is a block state value to force place for this block, for example facing: "east".

Example: /give @s bamboo_slab[block_state={type:"top"}]

  • Gives a bamboo slab that is always placed in the top half of the block.

blocks_attacks

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:blocks_attacks: When present, this item can be used like a shield to block attacks to the holding player.
      • [Float] block_delay_seconds: The amount of time (in seconds) that use must be held before successfully blocking attacks. Defaults to 0.
      • [Float] disable_cooldown_scale: The multiplier applied to the cooldown time for the item when attacked by a disabling attack (the multiplier for [Float] disable_blocking_for_seconds on the minecraft:weapon component). If set to 0, this item can never be disabled by attacks. Defaults to 1.
      • [NBT List / JSON Array] damage_reductions: Controls how much damage should be blocked in a given attack.
        • [NBT Compound / JSON Object]: A damage reduction field
          • [String][NBT List / JSON Array] type: Any number of damage type(s) (an [String] ID, or a [String] tag with #, or an [NBT List / JSON Array] array containing [String] IDs) to block. Defaults to all damage types.
          • [Float] base: The constant amount of damage to be blocked.
          • [Float] factor: The fraction of the dealt damage to be blocked.
          • [Float] horizontal_blocking_angle: strictly positive float — The maximum angle between the users facing direction and the direction of the incoming attack to be blocked. Defaults to 90
      • [NBT Compound / JSON Object] item_damage: Controls how much damage should be applied to the item from a given attack.
        • [Float] threshold: The minimum amount of damage dealt by the attack before item damage is applied to the item. Defaults to 0.
        • [Float] base: The constant amount of damage applied to the item, if threshold is passed. Defaults to 0.
        • [Float] factor: The fraction of the dealt damage that should be applied to the item, if threshold is passed. Defaults to 1.5.
      • [String][NBT Compound / JSON Object] block_sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition) to play when an attack is successfully blocked. Defaults to none.
        • A sound event see Template:Nbt inherit/sound event/template
      • [String][NBT Compound / JSON Object] disabled_sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition) to play when the item goes on its disabled cooldown due to an attack. Defaults to none.
        • A sound event see Template:Nbt inherit/sound event/template
      • [String] bypassed_by: a damage type tag with # of damage types that bypass the blocking. Defaults to none.


Example: /give @s diamond_sword[blocks_attacks={disable_cooldown_scale:0,damage_reductions:[{types:[mob_attack,arrow,explosion],base:0,factor:0.5}],block_sound:block.anvil.place}]

  • Gives a diamond sword that can block half of the damage from mob attacks, arrows, and explosions, cannot be disabled by a disabling attack, and plays the anvil place sound upon successful blocking.

break_sound

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String][NBT Compound / JSON Object] minecraft:break_sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition) to play when the item runs out of durability and breaks.
      • A sound event see Template:Nbt inherit/sound event/template

Example: /give @s diamond_sword[break_sound="item.wolf_armor.break"]

  • Gives a diamond sword that when runs out of durability, it plays the wolf armor break sound.

bucket_entity_data

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:bucket_entity_data: NBT applied to an entity when placed from this bucket. Only tags below are applied.
      • [Boolean] NoAI: Turns into NoAI entity tag for all bucketable entities.
      • [Boolean] Silent: Turns into Silent entity tag for all bucketable entities.
      • [Boolean] NoGravity: Turns into NoGravity entity tag for all bucketable entities.
      • [Boolean] Glowing: Turns into Glowing entity tag for all bucketable entities.
      • [Boolean] Invulnerable: Turns into Invulnerable entity tag for all bucketable entities.
      • [Float] Health: Turns into Health entity tag for all bucketable entities.
      • [Int] Age: Turns into Age entity tag for axolotls and tadpoles.
      • [Long] HuntingCooldown: Turns into the expiry time of the memory module has_hunting_cooldown for axolotls.

Other tags such as the entity's name or variant are stored as separate item components such as minecraft:custom_name and minecraft:tropical_fish/pattern.

Example: /give @s axolotl_bucket[bucket_entity_data={Health:3.0f},axolotl/variant="wild",custom_name="Bob"]

  • Gives a bucket of axolotl that has 3 health, the Wild type, and is named "Bob".

bundle_contents

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT List / JSON Array] minecraft:bundle_contents: The items stored inside this bundle. Adding this component to any item other than a bundle does nothing. If this component is removed from a bundle, it cannot be used by the player and the usual instruction and fullness bar does not appear in the tooltip.
      • [NBT Compound / JSON Object]: A single item stack.
        • A single item stack see Template:Nbt inherit/itemnoslot/template

Example: /give @s bundle[bundle_contents=[{id:"diamond",count:2}]]

  • Gives a bundle containing exactly 2 diamonds.

can_break

When present, the player holding the item can break the specified blocks in Adventure mode.

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object][NBT List / JSON Array] minecraft:can_break: The only blocks this item may break when used by a player in Adventure mode. If defined as a compound, corresponds to [NBT Compound / JSON Object] A single block predicate. Items are listed in the tooltip in the order specified.
      • [NBT Compound / JSON Object]: A single block predicate.
        • [String][NBT List / JSON Array] blocks: Can be a block ID or a block tag with a #, or a list of block IDs. If a single item ID is specified, its default translated name will be shown in the tooltip. If multiple block IDs, a block tag, or no block ID is specified then it will be listed as "Unknown" in the tooltip.
        • [NBT Compound / JSON Object] nbt: Block entity NBT to match. See Block entity format.
        • [NBT Compound / JSON Object] state: The block state properties to match.
          • [String] <block state>: A key-value pair, where the key is a block state key and the value is a block state value to match, for example facing: "east".

Example: /give @s netherite_pickaxe[can_break={blocks:['black_concrete','coal_ore','iron_ore','gold_ore','diamond_ore','emerald_ore']}]

  • Gives a netherite pickaxe that can only mine some ores, as well as black concrete.

can_place_on

When present, the player holding the item can place the held block item on any sides of the specified blocks in Adventure mode.

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object][NBT List / JSON Array] minecraft:can_place_on: Determines which blocks that blocks with this component can be placed against in Adventure mode. If defined as a compound, corresponds to [NBT Compound / JSON Object] A single block predicate. Items are listed in the tooltip in the order specified.
      • [NBT Compound / JSON Object]: A single block predicate.
        • [String][NBT List / JSON Array] blocks: Can be a block ID or a block tag with a #, or a list of block IDs. If a single item ID is specified, its default translated name will be shown in the tooltip. If multiple block IDs, a block tag, or no block ID is specified then it will be listed as "Unknown" in the tooltip.
        • [NBT Compound / JSON Object] nbt: Block entity NBT to match. See Block entity format.
        • [NBT Compound / JSON Object] state: The block state properties to match.
          • [String] <block state>: A key-value pair, where the key is a block state key and the value is a block state value to match, for example facing: "east".

Example: /give @s target[can_place_on={blocks:'sandstone'}]

  • Gives a target block that can only be placed on sandstone.

charged_projectiles

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT List / JSON Array] minecraft:charged_projectiles: The items loaded as projectiles into this crossbow. If there are items in this component, they are listed in the tooltip of the item. If not present, this crossbow is not charged.
      • [NBT Compound / JSON Object]: A single projectile item stack.
        • A single item stack see Template:Nbt inherit/itemnoslot/template

Example: /give @s crossbow[charged_projectiles=[{id:"spectral_arrow"}]]

  • Gives a crossbow that is already charged with a spectral arrow.

Note: Adding an invalid projectile or item id charges an arrow that, when collected, grants the wrong item. Ex: wind_charge causes it to fire an arrow that grants a wind charge when collected.

consumable

If present, the item can be consumed. Its options can also be modified.

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:consumable: If present, this item can be consumed on use.
      • [Float] consume_seconds: The amount of seconds it takes for a player to consume the item. Defaults to 1.6.
      • [String] animation: The animation used during consumption of the item. Must be one of none, eat, drink, block, bow, spear, crossbow, spyglass, toot_horn, brush, bundle, or trident. Defaults to eat.
      • [String][NBT Compound / JSON Object] sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition) used during and on completion of the item's consumption. Defaults to entity.generic.eat.
        • A sound event see Template:Nbt inherit/sound event/template
      • [Boolean] has_consume_particles: Whether consumption particles are emitted while consuming this item. Defaults to true.
      • [NBT List / JSON Array] on_consume_effects: A list of effects which take place as a result of consuming this item. Optional.
        • [NBT Compound / JSON Object]: A single consume effect.
          • Consume effect see Template:Nbt inherit/consume effect/template

Example: /give @s gold_ingot[consumable={consume_seconds:3.0, animation:'eat', sound:'entity.generic.eat', has_consume_particles:true, on_consume_effects:[{type:'minecraft:clear_all_effects'}]}]

  • Gives a gold ingot that can be eaten in 3 seconds and upon consuming, clears all effects.

container

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT List / JSON Array] minecraft:container: The items contained in this container's slots. Items are listed in the tooltip of the item (only seen on shulker boxes in normal gameplay or ctrl-middle-clicked containers in creative mode).
      • [NBT Compound / JSON Object]: A single item.
        • [NBT Compound / JSON Object] item: The item stack in this slot.
          • A single item stack see Template:Nbt inherit/itemnoslot/template
        • [Int] slot: A slot in this container. Can be from 0 to 255 (inclusive).

Example: /give @s barrel[container=[{slot:0,item:{id:apple}}]]

  • Gives a barrel with an apple in the first slot.

container_loot

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:container_loot: The unresolved loot table and seed of this container item.
      • [String] loot_table: The ID of a loot table.
      • [Long] seed: The pseudorandom seed to resolve the loot table with. If not specified or 0, a seed is randomly chosen by the game.

Example: /give @s chest[container_loot={loot_table:"chests/desert_pyramid"}]

  • Gives a chest that contains the desert pyramid loot when opened.

custom_data

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String][NBT Compound / JSON Object] minecraft:custom_data: Contains key-value pairs of any custom data not used by the game, either as an object or a SNBT string.
      • [Undefined] <key>: A key-value pair, where the value can have any data type, including another compound.

Example: /give @s iron_sword[custom_data={foo:1}]

  • Gives an iron sword with custom data {foo:1}.

custom_model_data

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:custom_model_data: A list of values used by items model definitions for model selection and coloring.
      • [NBT List / JSON Array] floats: A list of [Float] floats for the range_dispatch model type. Missing values return the fallback model.
      • [Byte Array] flags: A list of [Boolean] booleans for the condition model type. Missing value returns the is_false model.
      • [NBT List / JSON Array] strings: A list of [String] strings for the select model type. Missing value returns the fallback model.
      • [NBT List / JSON Array][Int Array] colors: A list of RGB values for the model model type's tints. Missing values return the default value provided by the item model definition. Each entry can either be a list of floats or an integer. Any provided lists automatically convert to an integer, so the component is saved as an int array.
        • [Int]: An RGB color code converted to a decimal number. It can be calculated from the Red, Green and Blue components using this formula:
          Red<<16 + Green<<8 + Blue
          An interactive widget is being loaded. If this does not work for you, please reload the page or check if JavaScript is working or enabled.
        • [NBT List / JSON Array]: A list containing 3 floats corresponding to red, green, and blue values as a fraction (ranged 0 to 1, inclusive). Automatically converted to the integer format when saved.

Example:

/give @s bone[custom_model_data={floats:[4.0, 5.6, 99.1],strings:["foo:bar"],colors:[8323327, [0.5,0,1], 0x7F00FF]}]
  • Gives a bone with custom model data. The colors list shows three possible representations of the same violet color.

custom_name

Used to specify the item's custom name, like you can in an anvil. This component:

  • has a higher priority over the minecraft:item_name component
  • can be renamed or removed using an anvil
  • if unspecified otherwise, the item's name defaults to being italic.
  • [NBT Compound / JSON Object] components: Parent tag.
    • [String][NBT List / JSON Array][NBT Compound / JSON Object] minecraft:custom_name: Text component to use as this item's name. See Text component format.

Example:

/give @s stick[custom_name={text:"Magic Wand",color:"light_purple",italic:false}]
  • Gives a stick named "Magic Wand" in light purple non-italicized text.

damage

  • [NBT Compound / JSON Object] components: Parent tag.
    • [Int] minecraft:damage: The number of uses consumed (not remaining) of the item's durability. Must be a non-negative integer, defaults to 0. If not present, the item cannot take damage.

Example: /give @s diamond_axe[damage=500]

  • Gives a diamond axe with 500 points of damage.

damage_resistant

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:damage_resistant: If specified, this item is invulnerable to the specified damage types when in entity form or equipped.

damage_type

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:damage_type: Specifies the damage type this item deals

Example: /give @s diamond_sword[damage_type="minecraft:campfire"]

  • Gives a diamond sword that deals "campfire" type damage.

death_protection

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:death_protection: If present, this item protects the holder from dying by restoring a single health point.
      • [NBT List / JSON Array] death_effects: A list of consume effects that are applied when the item protects the holder. Optional.
        • [NBT Compound / JSON Object]: A single consume effect.
          • Consume effect see Template:Nbt inherit/consume effect/template

Example: /give @s nether_star[death_protection={death_effects:[{type:'minecraft:clear_all_effects'}]}]

  • Gives a nether star that protects the holder from death and when did so, removes all status effects from the holder.

debug_stick_state

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:debug_stick_state: The selected block state properties used by this debug stick.
      • [String] <block ID>: A key-value pair, where the key is a block ID and the value is a block state key to edit on the block, for example "minecraft:oak_fence": "east".

Example: /give @s debug_stick[debug_stick_state={"minecraft:oak_fence": "west", "minecraft:candle": "lit"}]

  • Gives a debug stick with the oak fence block state property set to west and the candle block state property set to lit.

dye

This section describes content that is currently in development for Java Edition.
 
This content has appeared in development versions for Java Edition 26.1, but the full update adding it has not been released yet.
  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:dye: One of white, orange, magenta, light_blue, yellow, lime, pink, gray, light_gray, cyan, purple, blue, brown, green, red, or black. Represents the color of a dye for mob and block interactions and recipes.

Example: /give @s blue_dye[dye="red"]

  • Gives a blue dye item that acts like a red dye.

dyed_color

  • [NBT Compound / JSON Object] components: Parent tag.
    • [Int] minecraft:dyed_color: The color applied of this leather armor or wolf armor item. More generally, it is used as the minecraft:dye color provider in item model definitions. If present on an item, a gray and italic "Dyed" text is added to the tooltip (If you have "Advanced tooltips" on, you will see it an non-italic "Color: #<hex color code>" instead). Color codes are the hex code of the color converted to a decimal number, or can be calculated from the red, green and blue components using this formula:
      (
       Red
      << 16) + (
       Green
      << 8) +
       Blue
      [note 1]
      An interactive widget is being loaded. If this does not work for you, please reload the page or check if JavaScript is working or enabled.
    • [NBT List / JSON Array] minecraft:dyed_color: Another format. A list containing 3 floats corresponding to red, green and blue values as a fraction (ranged 0 to 1, inclusive) that is automatically converted to the int format.

Example: /give @s leather_helmet[dyed_color=8388403]

or: /give @s leather_helmet[dyed_color=0x7FFF33]

or: /give @s leather_helmet[dyed_color=[0.5, 1.0, 0.2]]

  • Gives a blueish-green leather helmet.

enchantable

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:enchantable: If this and minecraft:enchantments are present on an item, and applicable enchantments are available, the item can be enchanted in an enchanting table.
      • [Int] value: Positive integer representing the item's enchantability. A higher value allows enchantments with a higher cost to be picked.

Example: /give @s elytra[enchantable={value:15}]

  • Gives a pair of elytra that can be enchanted in an enchanting table with an enchantability of 15.

enchantment_glint_override

  • [NBT Compound / JSON Object] components: Parent tag.
    • [Boolean] minecraft:enchantment_glint_override: Overrides the enchantment glint effect on this item. When true, this item displays a glint, even without enchantments. When false, this item does not display a glint, even with enchantments.

Example: /give @s experience_bottle[enchantment_glint_override=false]

  • Gives an experience bottle without the visual enchantment glint, which is otherwise applied by default.

enchantments

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:enchantments: Contains a map of each of this item's enchantments to its enchantment level. This and minecraft:enchantable must exist on an item for it to be able to be enchanted in an enchanting table. If present on an item, the color of the item name is aqua if its rarity is common or uncommon, and light purple if its rarity is rare or epic. If present on an item, the enchantments are listed in the item's tooltip. The order of the enchantments in the tooltip is defined by the #minecraft:tooltip_order enchantment tag.
      • [Int] <enchantment ID>: A single key-value pair, where the key is the resource location of an enchantment, and the value is the level.

Example: /give @s wooden_sword[enchantments={sharpness:3,knockback:2}]

  • Gives a wooden sword with sharpness III and knockback II.

Note: This component adds active enchantments and should not be confused with the minecraft:stored_enchantments component, which is used to add inactive enchantments, such as with enchanted books.

To illustrate the difference, hitting an entity with an enchanted_book[enchantments={knockback:2}] would knock any entity hit per knockback II while hitting an entity with an enchanted_book[stored_enchantments={knockback:2}] would not.

Furthermore the latter would be able to add knockback II to an enchantable item in an anvil, while the former would not.

entity_data

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:entity_data: NBT applied to an entity when created from an item. Depending on the entity type that this item spawns, and the entity ID specified in this component, this component may add a red message to the item's tooltip warning the player that using it may result in command execution.
      • See Entity format. Must include id tag. Excludes UUID and Passengers.

Example: /give @s armor_stand[entity_data={id:"armor_stand",Small:1b}]

  • Gives an armor stand that is small when placed down.

equippable

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:equippable: If present, this item can be equipped in the specified slot.
      • [String] slot: The slot to put the item on. Can be one of head, chest, legs, feet, body, mainhand, offhand, or saddle
      • [String][NBT Compound / JSON Object] equip_sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition) to play when the item is equipped. Defaults to item.armor.equip_generic.
        • A sound event see Template:Nbt inherit/sound event/template
      • [String] asset_id: The resource location of the equipment model to use when equipped. The directory this refers to is assets/<namespace>/equipment/<id>.json. If not specified, falls back to rendering as the item itself when in the head slot (if not applicable, the item does not render).
      • [String][NBT List / JSON Array] allowed_entities: Entity ID, Entity Tag, or list of Entity IDs to limit which entities can equip this item. Defaults to all entities.
      • [Boolean] dispensable: Whether the item can be dispensed by using a dispenser.[note 2] Defaults to true.
      • [Boolean] swappable: Whether the item can be equipped into the relevant slot by right-clicking. Defaults to true.
      • [Boolean] damage_on_hurt: Whether this item is damaged when the wearing entity is damaged. Defaults to true.
      • [Boolean] equip_on_interact: Whether this item can be equipped onto a target mob by pressing use on it (as long as this item can be equipped on the target at all). Defaults to false.
      • [String] camera_overlay: The resource location of the overlay texture to use when equipped. The directory this refers to is assets/<namespace>/textures/<id>. Assets which do not exist will use the missing texture, rather than falling back to a default such as the pumpkin overlay.
      • [Boolean] can_be_sheared: Whether this item can be unequipped from a target mob by right-clicking with Shears. Defaults to false.
      • [String][NBT Compound / JSON Object] shearing_sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition) to play when the item is sheared. Defaults to item.shears.snip.

Example 1: /give @s glass[equippable={slot:"head",equip_sound:"block.glass.break",dispensable:true}]

  • Gives a glass block that can be equipped in the helmet slot.

Example 2: /give @s leather_leggings[equippable={slot:legs,asset_id:"minecraft:diamond"}]

  • Gives a pair of leather pants that appear as diamond leggings when worn.

firework_explosion

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:firework_explosion: The explosion effect stored by this firework star.
      • [String] shape: The shape of the explosion. Can be small_ball, large_ball, star, creeper, or burst.
      • [NBT List / JSON Array] colors: The colors of the initial particles of the explosion, randomly selected from.
        • [Int] A color as a packed integer
      • [NBT List / JSON Array] fade_colors: The colors of the fading particles of the explosion, randomly selected from.
        • [Int] A color as a packed integer
      • [Boolean] has_trail: Whether or not the explosion has a trail effect (diamond).
      • [Boolean] has_twinkle: Whether or not the explosion has a twinkle effect (glowstone dust).

fireworks

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:fireworks
      • [Byte] flight_duration: The flight duration of this firework rocket (and the number of gunpowders used to craft it). Must be an integer between -128 and 127. Defaults to 1. If specified, gray "Flight Duration: <flight_duration>" text is added to the item's tooltip.
      • [NBT List / JSON Array] explosions: List of the explosion effects caused by this firework rocket. Has a maximum of 256 explosions. Each explosion is listed in the item's tooltip as its shape on the first line, then additional information such as color indented on further lines.
        • [NBT Compound / JSON Object]: A single explosion effect.
          • [String] shape: The shape of the explosion. Can be small_ball, large_ball, star, creeper, or burst.
          • [NBT List / JSON Array] colors: The colors of the initial particles of the explosion, randomly selected from.
            • [Int][NBT List / JSON Array] A color as a packed integer or list of three floats.
          • [NBT List / JSON Array] fade_colors: The colors of the fading particles of the explosion, randomly selected from.
            • [Int][NBT List / JSON Array] A color as a packed integer or list of three floats.
          • [Boolean] has_trail: Whether or not the explosion has a trail effect (diamond).
          • [Boolean] has_twinkle: Whether or not the explosion has a twinkle effect (glowstone dust).

food

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:food: The food stats applied to the mob or player upon consuming this item. If this and minecraft:consumable (consumable is required) are present on an item, a fox can consume the item when holding it in its mouth for 30 seconds.
      • [Int] nutrition: The number of food points restored by this item when eaten. Must be a non-negative integer.
      • [Float] saturation: The amount of saturation restored by this item when eaten.
      • [Boolean] can_always_eat: If true, this item can be eaten even if the player is not hungry. Defaults to false.

Example 1: /give @s melon_slice[food={nutrition:3,saturation:1,can_always_eat:true}]

  • Gives a melon slice that can be eaten at any time and restores 3 food points and 1 saturation.

Example 2: /give @s minecraft:sponge[consumable={consume_seconds:2.4},food={nutrition:5,saturation:5,can_always_eat:true}]

  • Gives a sponge that can be eaten at any time, takes 2.4 seconds to consume, and restores 5 food points and 5 saturation.

glider

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:glider: If present, this item allows players to glide (as with elytra) when equipped.

Example: /give @s nether_star[equippable={slot:"head"},glider={}]

  • Gives a nether star that can be equipped in the head slot and if on the head, allows the player to glide.

instrument

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String][NBT Compound / JSON Object] minecraft:instrument: One instrument (an [String] ID, or a new [NBT Compound / JSON Object] instrument definition). If present on an item, the description of the instrument is shown in the item's tooltip as gray text.

      There are actually two unique states of this component that both register in usage as the minecraft:ponder_goat_horn instrument ID, but they do not stack with each other, only one of them matches a component comparison for that ID, and only one of them gets serialised while the other does not. This "ghost" Ponder goat horn instrument is only accessible as the default instrument component of the goat_horn item.‌[until 26.1]

      • [NBT Compound / JSON Object] description: A text component that is used as a description in tooltips.
      • [String][NBT Compound / JSON Object] sound_event: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition)
        • A sound event see Template:Nbt inherit/sound event/template
      • [Float] use_duration: A non-negative float for how long the use duration is.
      • [Float] range: A non-negative float for the range of the sound.

Example 1: /give @s goat_horn[instrument="feel_goat_horn"]

  • Gives a goat horn that uses the Feel instrument.

Example 2: /give @s goat_horn[instrument={description: "prank!", sound_event: "entity.creeper.primed", use_duration:2, range:30}]

  • Gives a goat horn that plays the entity.creeper.primed sound.

intangible_projectile

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:intangible_projectile: If set, this projectile item can't be picked up by a player when fired, except in creative mode.

Example: /give @s arrow[intangible_projectile={}]

  • Gives an arrow that cannot be picked up by the player

item_model

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:item_model: The resource location of the item, which references the item model definition /assets/<namespace>/items/<id> without the .json suffix. Referencing nonexistent models will cause the missing model to be used, rather than falling back to the item ID's default model.

Example: /give @s netherite_sword[item_model="minecraft:diamond_sword"]

  • Gives a netherite sword that looks like a diamond sword.

item_name

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String][NBT List / JSON Array][NBT Compound / JSON Object] minecraft:item_name: The default name of this item, as a text component. See Text component format. Unlike the minecraft:custom_name component, this name cannot be erased using an anvil, is not italicized, and does not appear in some labels, such as banner markers and item frames.

jukebox_playable

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:jukebox_playable: One jukebox song (an [String] ID) to play when inserted into a jukebox. If present on an item, the item can be inserted into a jukebox to play the specified song. If present on an item, the artist and the title of the song are added to the item's tooltip as gray text.

Example: /give @s diamond[minecraft:jukebox_playable="pigstep"]

  • Gives a diamond that plays Pigstep when inserted into a jukebox

kinetic_weapon

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:kinetic_weapon: Enables a charge-type attack when using the item where, while being used, the damage is dealt along a ray every tick based on the relative speed of the entities
      • [Int] delay_ticks: The time in ticks required before weapon is effective. Defaults to 0.
      • [NBT Compound / JSON Object] damage_conditions: The condition under which the charge attack deals damage.
        • Kinetic weapon conditions: see Template:Nbt inherit/kinetic_weapon_conditions/template
      • [NBT Compound / JSON Object] dismount_conditions: The condition under which the charge attack dismounts the target.
        • Kinetic weapon conditions: see Template:Nbt inherit/kinetic_weapon_conditions/template
      • [NBT Compound / JSON Object] knockback_conditions: The condition under which the charge attack deals knockback.
        • Kinetic weapon conditions: see Template:Nbt inherit/kinetic_weapon_conditions/template
      • [Float] forward_movement: The distance the item moves out of the wielder's hand during its animation. Defaults to 0.0.
      • [Float] damage_multiplier: The multiplier for the final damage from the relative speed.[note 3] Defaults to 1.0.
      • [String][NBT Compound / JSON Object] sound: Optional sound event to play when the weapon is engaged.
        • A sound event see Template:Nbt inherit/sound event/template
      • [String][NBT Compound / JSON Object] hit_sound: Optional sound event to play when the weapon hits an entity.
        • A sound event see Template:Nbt inherit/sound event/template

Example: /give @s amethyst_shard[kinetic_weapon={forward_movement:0.0,delay_ticks:20,damage_conditions:{max_duration_ticks:60},knockback_conditions:{max_duration_ticks:40},dismount_conditions:{max_duration_ticks:20},hit_sound:"block.amethyst_cluster.step"}]

  • Gives an amethyst shard which can perform a charge attack after a 1-second delay. The attack can damage entities for 3 seconds, knock them back for the first 2 seconds and dismount them for the first second. Hitting a target with the attack plays an amethyst sound.

lock

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:lock: An item predicate representing the "key" to open this container item.
      • item predicate see Template:Nbt inherit/conditions/item/template

Example 1: /give @p chest[minecraft:lock={components:{"minecraft:item_model":"minecraft:diamond"}}]

  • Gives a chest that is locked, opening only if the player is holding an item with the same model as a Diamond.

Example 2: /give @p furnace[minecraft:lock={components:{"minecraft:custom_name":"Furnace Key"}}]

  • Gives a furnace that opens only if the player is holding an item with the custom name "Furnace Key".

Example 3: /give @p barrel[minecraft:lock={items:["minecraft:oak_planks","minecraft:diamond"],count:6,predicates:{custom_data:{bar:foo}}}]

  • Gives a barrel that opens only if the player is holding exactly 6 oak planks or 6 diamonds that has the custom data bar:foo

lodestone_tracker

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:lodestone_tracker: Stores information about the lodestone this compass should point toward. If present on a compass item, the base item name will be overridden as "Lodestone Compass". While tracked in a player's inventory, a compass with this component will do active polling to see if the position of its lodestone is loaded, and if it is and the lodestone has been destroyed then this component is removed.
      • [NBT Compound / JSON Object] target: Information about the lodestone. Optional. If not set, this compass spins randomly.
        • [Int Array] pos: The integer coordinates of the lodestone.
        • [String] dimension: The ID of the dimension of the lodestone.
      • [Boolean] tracked: If true, the component is removed when the lodestone is broken. If false, the component is kept. Defaults to true.

Example: /give @s compass[minecraft:lodestone_tracker={target:{pos:[I;1,2,3],dimension:"overworld"}}]

  • Gives a compass that points toward a lodestone that is located in the Overworld at x=1,y=2,z=3

lore

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT List / JSON Array] minecraft:lore: List of additional lines to display in this item's tooltip. Has a maximum of 256 lines.
      • [String][NBT List / JSON Array][NBT Compound / JSON Object]: Text component representing a line of text. See Text component format.

Example 1: /give @p stick[lore=[{text:"This Stick is very sticky."}]]

  • Gives a stick with lore in its tooltip.

Example 2: /give @p diamond[lore=[{text:"A shiny Diamond!",italic:false,color:"gold"}]]

  • Gives a diamond that has lore in its tooltip. The color of the lore is gold, and its italics have been removed.

Example 3: /give @p emerald[lore=[{text:"A shiny Emerald!","italic":false,"color":"gold"}, {text:"Maybe share it with a friend?",italic:false,color:"yellow"}]]

  • Gives an emerald that has 2 lines of lore in its tooltip. The first line has a golden color, and the second has a yellow color. Both lines have had their italics removed.

map_color

  • [NBT Compound / JSON Object] components: Parent tag.
    • [Int] minecraft:map_color: The color code for the minecraft:map_color color provider in item model definitions. Normally used by the minecraft:filled_map item model.

Example: /give @s filled_map[map_color=16711680]

  • Gives a filled map with red markings on item texture.
An interactive widget is being loaded. If this does not work for you, please reload the page or check if JavaScript is working or enabled.

map_decorations

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:map_decorations: Contains key-value pairs of the icons to display on this filled map.
      • [NBT Compound / JSON Object] <key>: The key-value pair of a single icon, where the key is an arbitrary unique string identifying the decoration.
        • [String] type: The type of the icon. Can be player, frame, red_marker, blue_marker, target_x, target_point, player_off_map, player_off_limits, mansion, monument, banner_white, banner_orange, banner_magenta, banner_light_blue, banner_yellow, banner_lime, banner_pink, banner_gray, banner_light_gray, banner_cyan, banner_purple, banner_blue, banner_brown, banner_green, banner_red, banner_black, red_x, village_desert, village_plains, village_savanna, village_snowy, village_taiga, jungle_temple, or swamp_hut.
        • [Double] x: The X world coordinate of the decoration.
        • [Double] z: The Z world coordinate of the decoration.
        • [Float] rotation: The rotation of the icon, ranging from 0.0 to 360.0, rotated clockwise from north in degrees.

map_id

  • [NBT Compound / JSON Object] components: Parent tag.
    • [Int] minecraft:map_id: The number of this filled map, representing the shared state holding map contents and markers.

max_damage

  • [NBT Compound / JSON Object] components: Parent tag.
    • [Int] minecraft:max_damage: The maximum amount of damage that this item can take. If not set, this item cannot take damage. Must be a non-zero positive integer. Cannot be combined with minecraft:max_stack_size if it has a value greater than 1 (if the item can be stacked). For the durability bar to appear, the damage component must have a value. Example damage=0.

Example: /give @s diamond_pickaxe[max_damage=4]

  • Gives a diamond pickaxe that can only be used 4 times before breaking.

max_stack_size

  • [NBT Compound / JSON Object] components: Parent tag.
    • [Int] minecraft:max_stack_size: The maximum number of items that can fit in a stack. Must be a positive integer between 1 and 99 (inclusive). If it has a value greater than 1 (if the item can be stacked), cannot be combined with minecraft:max_damage. If this component is removed, it will behave as though it was set to 1.

Example: /give @s acacia_boat[max_stack_size=64] 5

  • Gives a stack of 5 acacia boats all in a single slot.

minimum_attack_charge

  • [NBT Compound / JSON Object] components: Parent tag.
    • [Float] minecraft:minimum_attack_charge: Sets the minimum attack charge on the attack indicator required to attack with this item. Must be a non-negative float between 0.0 and 1.0

Example: /give @s diamond_sword[minimum_attack_charge=0.5] 1

  • Gives a diamond sword that can only attack once the attack indicator is at least half full.

note_block_sound

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:note_block_sound: The ID of the sound event played by a note block when this player head is placed above.

Example: /give @p minecraft:player_head[minecraft:profile=minecraftWiki,minecraft:note_block_sound=entity.item.pickup]

  • Gives a Player Head of the minecraftWiki. If placed on a Note Block, the Note Block plays the "Item Pickup" sound every time it's activated.

ominous_bottle_amplifier

  • [NBT Compound / JSON Object] components: Parent tag.
    • [Int] minecraft:ominous_bottle_amplifier: The amplifier of the Bad Omen effect given to the player or mob upon consuming this item (normally an ominous bottle). Must be a non-negative integer from 0 to 4 (inclusive). The duration of the effect is always 120000 ticks (1 hour and 40 minutes at the normal tick rate) and minecraft:potion_duration_scale is ignored. If present on an item, information about the mob effect is added to the tooltip, in the same format as the minecraft:potion_contents component.

piercing_weapon

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:piercing_weapon: Melee attacks using this item damage multiple entities along a ray, instead of only a single entity. Also prevents this item from being used to mine blocks.
      • [Boolean] deals_knockback: Whether the attack deals knockback. Defaults to true.
      • [Boolean] dismounts: Whether the attack dismounts the target. Defaults to false.
      • [String][NBT Compound / JSON Object] sound: Optional sound event to play when a player attacks with the weapon.
        • A sound event see Template:Nbt inherit/sound event/template
      • [String][NBT Compound / JSON Object] hit_sound: Optional sound event to play when the weapon hits an entity.
        • A sound event see Template:Nbt inherit/sound event/template

Example: /give @s minecraft:blaze_rod[minecraft:piercing_weapon={sound:"entity.blaze.hurt",hit_sound:"entity.lightning_bolt.impact"}]

  • Gives a blaze rod which whose melee attack pierces targets, dealing 1 damage to each, with fiery and explosive sounds accompanying the attacks.

pot_decorations

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT List / JSON Array] minecraft:pot_decorations: A list of the items (typically pottery sherds or bricks) applied on each face of this decorated pot. If the list is specified with less than 4 entries, the remaining ones default to "minecraft:brick". The first entry is the front face of the pot, and subsequent entries are the faces going clockwise around the pot. If this component is present on an item, the item's tooltip will list the translated names of each of the items in the same order.
      • [String]: The ID of an item. Can be either brick or a sherd.

Example: /give @s decorated_pot[pot_decorations=["skull_pottery_sherd","heart_pottery_sherd","blade_pottery_sherd","brick"]]

  • Gives a decorated pot with sherds: skull, heart and blade on its faces

potion_contents

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String][NBT Compound / JSON Object] minecraft:potion_contents: The base potion, custom list of mob effects, and custom color contained in this potion, splash potion, lingering potion, tipped arrow, or area effect cloud. When present on an item, the mob effects are listed in the item's tooltip. If this and a minecraft:consumable component are present on an item, consuming the item will apply all of the effects from this component to the player or mob that consumed it. If defined as a string, corresponds to [String] potion.
      • [String] potion: The ID of a potion type. Optional. See Potion#Item data.
      • [Int] custom_color: The overriding color of this potion texture, and/or the particles of the area effect cloud created.
      • [String] custom_name: An optional string used to generate containing stack name. The game uses the translation key item.minecraft.<item type>.effect.<value>. This name has a higher priority than the minecraft:item_name component, but lower than the minecraft:custom_name component.
      • [NBT List / JSON Array] custom_effects: A list of the additional effects that this item should apply.
        • [NBT Compound / JSON Object]: A single custom effect.
          • [String] id: The ID of the effect.
          • [Byte] amplifier: The amplifier of the effect, with level I having value 0. Optional, defaults to 0.
          • [Int] duration: The duration of the effect in ticks. Value -1 is treated as infinity. Values 0 or less than -2 are treated as 1. Optional, defaults to 1 tick.
          • [Boolean] ambient: Whether or not this is an effect provided by a beacon, conduit, or nautilus and therefore should be less intrusive on the screen. Optional, defaults to false.
          • [Boolean] show_particles: Whether or not this effect produces particles. Optional, defaults to true.
          • [Boolean] show_icon: Whether or not an icon should be shown for this effect. Optional, defaults to true.
An interactive widget is being loaded. If this does not work for you, please reload the page or check if JavaScript is working or enabled.

potion_duration_scale

  • [NBT Compound / JSON Object] components: Parent tag.
    • [Float] minecraft:potion_duration_scale: When present, for items that have the minecraft:potion_contents component, the duration of the applied effects is scaled by this factor. Defaults to 1.0.

Example: /give @p potion[potion_contents={potion:swiftness},potion_duration_scale=2]

  • Gives a Potion of Swiftness that has its default time doubled from 3 Minutes to 6 Minutes.

profile

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String][NBT Compound / JSON Object] minecraft:profile: The texture path, skin address, or user profile used to render player head blocks, player head item models, mannequins, and player object text components. If specified as a string, it corresponds to [String] name.

      If present on an item, and the [String] name field is specified, the base item name is overridden as "<name>'s Head".
      If present on an item, and one of either [String] name or [Int Array] id is specified (and not both), a gray "Dynamic" text is shown in the item's tooltip.
      However, if a textures entry in [NBT List / JSON Array] properties is specified, no tooltip is shown.

      The skin that is displayed is determined by one of the fields specified below:

      • [String] name: The name of a player profile (i.e. their username). If this is the only tag provided, the skin of the player with that username is used. If no profile is found, a random default skin is used. Optional.
      • [Int Array] id: The UUID of a player profile. If this is the only tag provided, the skin of the player with that UUID is used. If no profile is found, a random default skin is used. Optional.
      • [String] texture: Namespaced path to a player skin texture relative to the textures folder. If specified, this overrides the resolved skin or provided properties. This allows for transparent pixels on the inner body layers whereas resolved skins' are always opaque. Optional.
      • [String] cape: Namespaced path to a cape texture relative to the textures folder. If specified, this overrides the resolved skin or provided properties. Optional.
      • [String] model: The model to use. Either "wide" or "slim". If specified, this overrides the resolved skin or provided properties. Optional.
      • [NBT List / JSON Array] properties: A list of properties. Optional.
        • [NBT Compound / JSON Object]: A single property.
          • [String] name: The name of the property. Can be textures.
          • [String] value: The texture data json, encoded in base64.
          • [String] signature: Optional. Mojang's signature of the value, encoded in base64.

Example: /give @p player_head[profile=MinecraftWiki]

  • Gives a player head of MinecraftWiki.
An interactive widget is being loaded. If this does not work for you, please reload the page or check if JavaScript is working or enabled.

provides_banner_patterns

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:provides_banner_patterns: When present, this item can be placed in the pattern slot of a loom and provides the specified banner pattern tag. Must be a tag prefixed with #.

Example: /give @p diamond[provides_banner_patterns='#minecraft:pattern_item/globe']

  • Gives a diamond that can provide the globe banner pattern to a banner.

provides_trim_material

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:provides_trim_material: When present, this item provides the specified trim material when used in a trimming recipe.[note 4]

rarity

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:rarity: Sets the rarity of this item, which affects the default color of its name. Can be common, uncommon, rare, or epic. If this component does not exist on the item, then common is used.

Example: /give @p iron_sword[rarity=epic]

  • Gives an iron sword with a light purple name.

recipes

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT List / JSON Array] minecraft:recipes: The recipes that a player unlocks when this knowledge book is used.

Example: /give @p knowledge_book[recipes=["minecraft:end_crystal","minecraft:diamond","minecraft:stone_sword","minecraft:blast_furnace"]]

  • Gives a knowledge book that, when used, gives the player the recipes listed inside the component.

repair_cost

  • [NBT Compound / JSON Object] components: Parent tag.
    • [Int] minecraft:repair_cost: The number of experience levels to add to the base level cost when repairing, combining, or renaming this item with an anvil. Must be a non-negative integer, defaults to 0.

repairable

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:repairable: Allows the item to be repaired, if damageable, in an anvil using the specified ingredient.
      • [String][NBT List / JSON Array] items: Item, list of Items, or hash-prefixed Item Tag matching what can be used to repair this item.

Example: /give @p diamond_sword[repairable={items:"stick"}]

  • Gives a diamond sword that can be repaired with sticks in an anvil.

stored_enchantments

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:stored_enchantments: Contains a map of inactive enchantments and their levels. Adding this component to any item other than an enchanted book does nothing except add text to the item's tooltip. If this component is removed from an enchanted book, the item can no longer be combined with other enchanted books. If present on an item, the enchantments are listed in the item's tooltip. The order of the enchantments in the tooltip is defined by the #minecraft:tooltip_order enchantment tag.
      • [Int] <enchantment ID>: A single key-value pair, where the key is the resource location of an enchantment, and the value is the level.

suspicious_stew_effects

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT List / JSON Array] minecraft:suspicious_stew_effects: A list of unamplified mob effects given to the player or mob upon consuming this item (normally a suspicious stew). minecraft:potion_duration_scale is ignored. When present on an item, text is added to the item's tooltip only when it is inside of the item selection screen.
      • [NBT Compound / JSON Object]: A single custom effect.
        • [String] id: The ID of the effect.
        • [Int] duration: The duration of the effect in ticks. Defaults to 160.

swing_animation

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:swing_animation: Allows modification of the swinging animation.
      • [String] type: The type of swinging animation. Can be none, whack, stab. Defaults to whack.
      • [Int] duration: A positive integer that determines the animation's duration in ticks. Defaults to 6.

tool

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:tool: If set, this item is considered as a tool.
      • [Float] default_mining_speed: The default mining speed of this tool, used if no rules override it. Defaults to 1.0.
      • [Int] damage_per_block: The amount of durability to remove each time a block is broken with this tool. Must be a non-negative integer. Defaults to 1.
      • [Boolean] can_destroy_blocks_in_creative: Whether players can break blocks while holding this tool in Creative mode. Defaults to true.
      • [NBT List / JSON Array] rules: A list of rules for the blocks that this tool has a special behavior with. If a field is overridden by multiple matched rules, the one that comes first in the list is chosen.
        • [NBT Compound / JSON Object]: A single rule.
          • [String][NBT List / JSON Array] blocks: The blocks to match with. Can be a block ID or a block tag with a #, or a list of block IDs.
          • [Float] speed: If the blocks match, overrides the default mining speed. Optional.
          • [Boolean] correct_for_drops: If the blocks match, overrides whether or not this tool is considered correct to mine at its most efficient speed, and to drop items if the block's loot table requires it. If not set by any rules, defaults to false. Optional.

Example: /give @p oak_fence[max_stack_size=1,max_damage=350,damage=0,tool={default_mining_speed:1.5,damage_per_block:2,rules:[{blocks:"#mineable/pickaxe",speed:6,correct_for_drops:true}]}]

  • Gives an oak fence that has the properties of a pickaxe.

tooltip_display

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:tooltip_display: Allows the tooltips provided specifically by any given item component to be suppressed.
      • [Boolean] hide_tooltip: If true, the item has no tooltip when hovered.
      • [NBT List / JSON Array] hidden_components: The tooltips provided by any component in this list are hidden. If that component provides no tooltip, it has no effect.

Example 1: /give @p diamond_sword[tooltip_display={hidden_components:["minecraft:enchantments"]},enchantments={sharpness:1}]

  • Gives a diamond sword that is enchanted with Sharpness I, but doesn't show the enchantments in the tooltip.

Example 2: /give @p diamond_sword[tooltip_display={hide_tooltip:1b}]

  • Gives a diamond sword that when hovered, it shows no tooltip at all.

tooltip_style

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:tooltip_style: The resource location of the custom sprites for the tooltip background and frame which references textures /assets/<namespace>/textures/gui/sprites/tooltip/<id>_background and /assets/<namespace>/textures/gui/sprites/tooltip/<id>_frame. Instead of falling back to the default value, invalid specifications will use the missing texture.

trim

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:trim: Contains the trim applied to this armor piece. If present on an item, information about the armor trim is added to the item's tooltip.
      • [String] pattern: The ID of the trim pattern.
      • [String] material: The ID of the trim material, which applies a color to the trim.

Example: /give @p minecraft:leather_leggings[trim={"pattern":"host","material":"emerald"}] 1

unbreakable

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:unbreakable: If set, this item cannot lose durability, and blue "Unbreakable" text will appear in the item's tooltip.

use_cooldown

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:use_cooldown: If present, this item applies a use cooldown to all items of the same type when it has been used.
      • [Float] seconds: The use cooldown duration in seconds.
      • [String] cooldown_group: The unique resource location to identify this cooldown group. If present, the item is included in a use cooldown group and no longer shares cooldowns with its base item type, but instead with any other items that are part of the same use cooldown group. Optional.

Example: /give @p ender_pearl[use_cooldown={seconds:10,cooldown_group:"foo:bar"}]

  • Gives an ender pearl that has a 10 second cooldown after being used, and also applies that cooldown to any item that shares its cooldown_group.
    • If other items in the inventory share the same cooldown_group, but have different seconds, then using that item applies the seconds of itself to all other items in the inventory, rather than each item applying their own seconds to themselves.
  • Items can have their cooldowns disabled completely by removing the component with [!use_cooldown].

use_effects

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:use_effects: Defines the vibrations and player movement penalties when an item with a continuous use action is being used.
      • [Boolean] can_sprint: If the player can sprint during use. Defaults to false.
      • [Float] speed_multiplier: A ranged float (0.0-1.0 inclusive) speed multiplier inflicted during use. Defaults to 0.2.
      • [Boolean] interact_vibrations: Whether using this item emits the minecraft:item_interact_start and minecraft:item_interact_finish game events. Defaults to true.

use_remainder

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:use_remainder: If present, replaces the item with a remainder item if its stack count has decreased after use.
      • A single item stack see Template:Nbt inherit/itemnoslot/template

Example 1: /give @p splash_potion[use_remainder={id:"minecraft:gunpowder"}]

  • Gives a splash potion, which after being thrown, leaves gunpowder.

Example 2: /give @p cooked_chicken[use_remainder={id:"minecraft:bone",components:{custom_name:{text:"Chicken Bone"}},count:2}]

  • Gives a cooked chicken, which after being used, turns into 2 bones named "Chicken Bone".

weapon

If present, the item acts as a weapon. For attack damage see the minecraft:attribute_modifiers component.

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:weapon: When present, the specified amount of damage can be done to the item with each attack. Additionally, the 'Item Used' statistic is incremented for each attack with the item.
      • [Int] item_damage_per_attack: The amount to damage the item for each attack performed. Defaults to 1.
      • [Float] disable_blocking_for_seconds: The amount of seconds that this item can disable a blocking shield on successful attack. If set to 0, this item cannot disable a blocking shield. Defaults to 0.

Example 1: /give @p minecraft:stick[weapon={},max_damage=10,max_stack_size=1,damage=0]

  • Gives a Stick that has 10 durability, and loses 1 durability for each attack performed.

Example 2: /give @p iron_sword[minecraft:weapon={disable_blocking_for_seconds:5,item_damage_per_attack:10}]

  • Gives an Iron Sword that disables Shields when used on them for 5 seconds, but loses 10 durability for each attack performed.

writable_book_content

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:writable_book_content: The contents of this book and quill. Adding this component to any item other than a writable_book does nothing. If this component is removed from a writable_book item, attempting to use the item will still swing the arm and increment its used statistic, but no UI will appear.
      • [NBT List / JSON Array] pages: A list of the pages in the book.
        • [String][NBT Compound / JSON Object] title: The title of this written book. If set to a string, it corresponds to [String] raw.
          • [String] raw: The plain text content of the page.
          • [String] filtered: The filtered text of the page. Optional. Shown only to players with chat filter enabled, instead of [String] raw.

written_book_content

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:written_book_content: The contents and metadata of this written book. Adding this component to any item other than a written_book does nothing except add text to the item tooltip. If this component is removed from a written_book item, attempting to use the item will still swing the arm and increment its used statistic, but no UI will appear.
      • [NBT List / JSON Array] pages: A list of the pages in the book.
        • [NBT Compound / JSON Object] or [String][NBT List / JSON Array][NBT Compound / JSON Object]: A single page. If set to a string, list, or compound with no raw or filtered tags in it, it corresponds to [String][NBT List / JSON Array][NBT Compound / JSON Object] raw.
          • [String][NBT List / JSON Array][NBT Compound / JSON Object] raw: A text component representing the text content of the page. See Text component format.
          • [String][NBT List / JSON Array][NBT Compound / JSON Object] filtered: A text component representing the filtered text of the page. Optional. Shown only to players with chat filter enabled, instead of [String] raw.
      • [String][NBT Compound / JSON Object] title: The title of this written book. Overrides the base item name. If set to an empty string, it is ignored and does not override the base item name. If set to a string, it corresponds to [String] raw.
        • [String] raw: The plain text title. Has a maximum length of 32 characters.
        • [String] filtered: The filtered title. Optional. Shown only to players with chat filter enabled, instead of [String] raw.
      • [String] author: The author of this written book. This is shown in the item tooltip.
      • [Int] generation: The number of times this written book has been copied. 0 = original, 1 = copy of original, 2 = copy of copy, 3 = tattered. Defaults to 0. If the value is greater than 1, the book cannot be copied. If specified, this is shown in the item tooltip.
      • [Boolean] resolved: If true, the text components have already been resolved by the server. If false, they are resolved either when the book is opened by an operator, when the book is placed into a lectern by an operator, or when the item stack is written to a lectern's Book tag by a command. Defaults to false.

Entity variant components

This section is a work in progress.
 
Please help expand and improve it. The talk page may contain suggestions.
Note:
Add more information about entity variant components (in general)

Entity variant components are a group of components that are present in items like spawn eggs, mob buckets, paintings, item frames, etc. These components modify some of the properties of the entity stored within those items.

Here is a list of all entity variant components:

axolotl/variant

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:axolotl/variant: lucy, wild, gold, cyan, or blue — The variant of the axolotl

Example: /give @s axolotl_spawn_egg[axolotl/variant="blue"]

  • Gives a axolotl spawn egg that spawns a blue axolotl.

cat/collar

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:cat/collar: A dye color — The color of the collar of the cat

Example: /give @s cat_spawn_egg[cat/collar="blue"]

  • Gives a cat spawn egg that spawns a cat with a blue collar (once tamed).

cat/variant

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:cat/variant: One cat variant (an [String] ID) — The variant of the cat

Example: /give @s cat_spawn_egg[cat/variant="jellie"]

  • Gives a cat spawn egg that spawns a Jellie (gray and white) cat.

chicken/variant

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:chicken/variant: One chicken variant (an [String] ID) — The variant of the chicken

Example 1: /give @s chicken_spawn_egg[chicken/variant="cold"]

  • Gives a chicken spawn egg that spawns a cold chicken.

Example 2: /give @s egg[chicken/variant="cold"]

  • Gives an egg that has a chance to hatch a cold chicken.

cow/variant

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:cow/variant: One cow variant (an [String] ID) — The variant of the cow

Example: /give @s cow_spawn_egg[cow/variant="cold"]

  • Gives a cow spawn egg that spawns a cold cow.

fox/variant

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:fox/variant: red or snow — The variant of the fox

Example: /give @s fox_spawn_egg[fox/variant="snow"]

  • Gives a fox spawn egg that spawns a snow fox.

frog/variant

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:frog/variant: One frog variant (an [String] ID) — The variant of the frog

Example: /give @s frog_spawn_egg[frog/variant="cold"]

  • Gives a frog spawn egg that spawns a cold frog.

horse/variant

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:horse/variant: white, creamy, chestnut, brown, black, gray, or dark_brown — The variant of the horse

Example: /give @s horse_spawn_egg[horse/variant="chestnut"]

  • Gives a horse spawn egg that spawns a chestnut horse.

llama/variant

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:llama/variant: creamy, white, brown, or gray — The variant of the llama

Example: /give @s llama_spawn_egg[llama/variant="gray"]

  • Gives a llama spawn egg that spawns a gray llama.

mooshroom/variant

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:mooshroom/variant: red or brown — The variant of the mooshroom

Example: /give @s mooshroom_spawn_egg[mooshroom/variant="brown"]

  • Gives a mooshroom spawn egg that spawns a brown mooshroom.

painting/variant

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:painting/variant: One painting variant (an [String] ID) — The variant of the painting. If present on an item, the item's tooltip will display: the painting's name (in yellow), the artist's name (in gray), and the painting's width & height in blocks (in white). Not all paintings have an artist attributed to them.

Example: /give @s painting[painting/variant="plant"]

  • Gives a painting that places the "Paradisträd" painting.

parrot/variant

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:parrot/variant: red_blue, blue, green, yellow_blue, or gray — The variant of the parrot

Example: /give @s parrot_spawn_egg[parrot/variant="blue"]

  • Gives a parrot spawn egg that spawns a blue parrot.

pig/variant

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:pig/variant: One pig variant (an [String] ID) — The variant of the pig

Example: /give @s pig_spawn_egg[pig/variant="warm"]

  • Gives a pig spawn egg that spawns a warm pig.

rabbit/variant

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:rabbit/variant: brown, white, black, white_splotched, gold, salt, or evil — The variant of the rabbit

Example: /give @s rabbit_spawn_egg[rabbit/variant="evil"]

  • Gives a rabbit spawn egg that spawns an evil rabbit.

salmon/size

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:salmon/size: small, medium, large — The size of the salmon

Example: /give @s salmon_spawn_egg[salmon/size="large"]

  • Gives a salmon spawn egg that spawns a large salmon.

sheep/color

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:sheep/color: A dye color — The color of the wool of the sheep

Example: /give @s sheep_spawn_egg[sheep/color="blue"]

  • Gives a sheep spawn egg that spawns a sheep with blue wool.

shulker/color

  • [NBT Compound / JSON Object] components: Parent tag.

Example: /give @s shulker_spawn_egg[shulker/color="red"]

  • Gives a shulker spawn egg that spawns a red shulker.

tropical_fish/base_color

  • [NBT Compound / JSON Object] components: Parent tag.

tropical_fish/pattern

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:tropical_fish/pattern: kob, sunstreak, snooper, dasher, brinely, spotty, flopper, stripey, glitter, blockfish, betty, or clayfish — The pattern of the tropical fish

tropical_fish/pattern_color

  • [NBT Compound / JSON Object] components: Parent tag.

Example: /give @s tropical_fish_spawn_egg[tropical_fish/pattern="snooper", tropical_fish/base_color="red", tropical_fish/pattern_color="blue"]

  • Gives a tropical fish spawn egg that spawns a red-blue snooper tropical fish.

villager/variant

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:villager/variant: desert, jungle, plains, savanna, snow, swamp, or taiga — The variant of the villager

Example: /give @s villager_spawn_egg[villager/variant="desert"]

  • Gives a villager spawn egg that spawns a desert villager.

wolf/collar

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:wolf/collar: A dye color — The color of the collar of the wolf

Example: /give @s wolf_spawn_egg[wolf/collar="blue"]

  • Gives a wolf spawn egg that spawns a wolf with a blue collar (when tamed).

wolf/sound_variant

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:wolf/sound_variant: wolf sound variant definition — The sound variant of the wolf

Example: /give @s wolf_spawn_egg[wolf/sound_variant="cute"]

  • Gives a wolf spawn egg that spawns a cute wolf.

wolf/variant

  • [NBT Compound / JSON Object] components: Parent tag.
    • [String] minecraft:wolf/variant: One wolf variant (an [String] ID) — The variant of the wolf

Example: /give @s wolf_spawn_egg[wolf/variant="rusty"]

  • Gives a wolf spawn egg that spawns a rusty wolf.

Non-encoded components

These data components exist and are used by the game internally, but are not encoded on items. Therefore, they cannot be used in commands, nor seen with /data.

creative_slot_lock

  • [NBT Compound / JSON Object] components: Parent tag.
    • [NBT Compound / JSON Object] minecraft:creative_slot_lock: Only used internally to lock the informational paper items in the creative inventory. If set, this item cannot be taken out of its slot.

map_post_processing

  • [NBT Compound / JSON Object] components: Parent tag.
    • [Int] minecraft:map_post_processing: Only used internally when this filled map has been duplicated or locked in a crafting table or a cartography table. Can be 0 (lock) or 1 (scale), adding the "Locked" line or "Scale" line in this item's tooltip, respectively.

additional_trade_cost

This section describes content that is currently in development for Java Edition.
 
This content has appeared in development versions for Java Edition 26.1, but the full update adding it has not been released yet.
  • [NBT Compound / JSON Object] components: Parent tag.
    • [Int] minecraft:additional_trade_cost: Used on the gives item of a villager trade to add to the count of the wants item.

Exclusive to joke versions

The following components were added and used in April Fools' Day joke snapshots.

24w14potato

25w14craftmine

History

This section is missing information about: later 26.1 changes
 
Please expand the section to include this information. Further details may exist on the talk page.
Java Edition
1.20.524w09aReplaced [NBT Compound / JSON Object] tag tag and all underlying item-specific tags with data components.
Replaced [Byte] Count with [Int] count.
24w10aRenamed lodestone_target component to lodestone_tracker, and moved [Int Array] pos and [String] dimension fields to [NBT Compound / JSON Object] target.
profile, dyed_color, attribute_modifiers, potion_contents, enchantments, and stored_enchantments components can now optionally be defined in simpler formats.
lore and fireworks components now allow up to 256 entries in their list.
container component now applies to all containers, instead of only shulker boxes.
[String] name is no longer required in profile component.
24w12aAdded food, max_stack_size, max_damage, fire_resistant, rarity, tool, and hide_tooltip components.
The old {...} item format has been removed, and can no longer be used as a shortcut for custom_data component.
24w13aAdded item_name, and ominous_bottle_amplifier components.
Components with non-default values on block items are now stored on block entities when placed.
24w14aRenamed [String] text to [String] raw in writable_book_content, and written_book_content components.
Pre-Release 1Renamed [Float] saturation_modifier to [Float] saturation in food component.
max_damage, and max_stack_size components can no longer be put together.
1.2124w19acustom_data component can now be defined as a SNBT string.
Added [NBT Compound / JSON Object] using_converts_to in food component.
24w21aAdded jukebox_playable component.
Changed attribute_modifiers component: removed [String] name and [Int Array] uuid fields, added [String] id field.
1.21.224w33aAdded repairable and enchantable components.
The title specified in the written_book_content component is now prioritized over custom_name and item_name for any item with a non-empty title in this component.
24w34aAdded consumable, use_cooldown and use_remainder components.
The food component has been changed to become a data container that holds only the food stats applied when the item is consumed. The component no longer gives the item the ability to be consumed. Removed the [Float] eat_seconds, [NBT Compound / JSON Object] using_converts_to and [NBT List / JSON Array] effects fields from food.
24w36aAdded equippable, item_model, glider and tooltip_style components.
The item_name component is now always present on every item.
24w37aAdded death_protection component.
Renamed fire_resistant component to damage_resistant, and added [String] types field.
The name provided by the item_name component now always has the lowest priority.
Added [String] custom_name in potion_contents component.
Added [Boolean] swappable and [Boolean] damage_on_hurt in equippable component.
24w39aThe lock component is now a compound that represents an item predicate.
Pre-Release 1Added [String] camera_overlay in equippable component.
1.21.424w45acustom_model_data now has more fields to accommodate new uses by various model property getters: floats, flags, strings and colors.
item_model now uses assets/[namespace]/items/, rather than assets/[namespace]/models/item.
The equippable component had its field model renamed to asset_id.
1.21.525w02aAdded weapon and potion_duration_scale components.
Added new optional field [Boolean] can_destroy_blocks_in_creative to tool component.
25w03a[Int] damage_per_attack field in weapon component was renamed to [Int] item_damage_per_attack
equippable component can now apply to saddle slot, and has a new optional field: [Boolean] equip_on_interact.
Added 21 components, all of which are entity variant components.
25w04aAdded the blocks_attacks, break_sound, provides_banner_patterns, provides_trim_material and tooltip_display components.
Removed the hide_tooltip and hide_additional_tooltip components in favor of the new tooltip_display component.
Removed the [Boolean] show_in_tooltip field from all components that previously had it in favor of the new tooltip_display component.
[Boolean] can_disable_blocking field in weapon component was renamed to [Float] disable_blocking_for_seconds.
Most components that used to have two fields (one of them being the [Boolean] show_in_tooltip field) now always use their simplified form, with the other one field inlined to top-level. For example: enchantments={levels:{sharpness:2}} -> enchantments={sharpness:2}
25w05aAdded [String] bypassed_by field to blocks_attacks component.
Added [Float] horizontal_blocking_angle field to objects within [NBT List / JSON Array] damage_reduction field to blocks_attacks component.
Added cow/variant entity variant component.
25w06aAdded chicken/variant entity variant component.
25w08aAdded wolf/sound_variant entity variant component.
1.21.625w15aAdded optional [NBT Compound / JSON Object] display field to attributes_modifiers.
25w16aThe painting/variant component no longer allows inline paining variant definitions.
25w20aAdded optional [Boolean] can_be_sheared and [String][NBT Compound / JSON Object] shearing_sound fields to equippable.
1.21.925w34aPlayer profiles in data components and block entities no longer resolve automatically.
The minecraft:profile component has now two behaviors, Static or Dynamic, depending on which fields are specified.
Pre-Release 1minecraft:profile: Profiles can now also have additional fields that can replace various values used for rendering; if any of the fields are omitted, the value from the resolved profile is used, even if the profile resolved to the default skin.
1.21.1125w41aAdded minecraft:damage_type, minecraft:kinetic_weapon, minecraft:minimum_attack_charge, minecraft:piercing_weapon, minecraft:swing_animation and minecraft:use_effects item components.
minecraft:consumable: The animation field has been updated.
minecraft:intangible: Items with this component now show information about it in their tooltip.
25w42aminecraft:kinetic_weapon: Added new field, contact_cooldown_ticks.
25w45aminecraft:piercing_weapon and minecraft:kinetic_weapon data components now have bounds on their reach parameters.
25w46aAdded food properties to the following fish bucket items: minecraft:cod_bucket, minecraft:salmon_bucket, minecraft:pufferfish_bucket, and minecraft:tropical_fish_bucket.
minecraft:use_effects: added field interact_vibrations.
pre1min_reach, max_reach and hitbox_margin have been moved from minecraft:piercing_weapon and minecraft:kinetic_weapon into a new component minecraft:attack_range to allow all melee weapon types to use them.
pre4minecraft:attack_range: Added fields min_creative_reach and max_creative_reach.
Upcoming Java Edition
26.1snap1Added minecraft:additional_trade_cost.
snap5Added minecraft:dye.

Notes

  1. For positive values larger than 0x00FFFFFF, the top byte is ignored. All negative values produce white.
  2. If the item type has special dispenser behavior, this has no effect.
  3. The damage dealt is calculated as floor(relative_speed * damage_multiplier), where relative_speed is the difference of speed vectors of the attacker and the target as projected onto the axis of the attacker's view vector. Any additional damage from enchantments or attribute modifiers is added after this calculation.
  4. To be used in the built-in smithing recipes, the item must also be in the #trim_material tag.

Navigation