Data component format
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
Items are stored in the NBT format. Sometimes a [Byte] Slot tag is used to specify the slot the item is in, such as with chests; other times there is no [Byte] Slot tag, such as with dropped items.
Item types hold a set of default components on an item, that individual item stacks can override. Default components are not saved on individual item stacks.
- [NBT Compound / JSON Object] The root tag.
- [Byte] Slot: The inventory slot the item is in.
- [String] id: The resource location of the item. Must not be
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.
- [NBT Compound / JSON Object] components: Optional map of data components. Additional information about the item.
- See the list of components below.
Block entity format
Block entities are stored in the NBT format. While they still use NBT for their specific properties, they keep the data components defined on the block item when placed.
- [NBT Compound / JSON Object] The root tag.
- [String] id: Block entity ID
- [Boolean] keepPacked: 1 or 0 (
true/false) - Iftrue, this is an invalid block entity, and this block is not immediately placed when a loaded chunk is loaded. Iffalse, 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 components.
- Additional tags depending on the block entity ID. See Block entity format.
List of components
attribute_modifiers
banner_patterns
base_color
bees
block_entity_data
block_state
blocks_attacks
break_sound
bucket_entity_data
bundle_contents
can_break
can_place_on
charged_projectiles
consumable
container
container_loot
custom_data
custom_model_data
custom_name
damage
damage_resistant
debug_stick_state
death_protection
dyed_color
enchantable
enchantment_glint_override
enchantments
entity_data
equippable
firework_explosion
fireworks
food
glider
instrument
intangible_projectile
item_model
item_name
jukebox_playable
lock
lodestone_tracker
lore
map_color
map_decorations
map_id
max_damage
max_stack_size
note_block_sound
ominous_bottle_amplifier
pot_decorations
potion_contents
potion_duration_scale
profile
provides_banner_patterns
provides_trim_material
rarity
recipes
repairable
repair_cost
stored_enchantments
suspicious_stew_effects
tool
tooltip_display
tooltip_style
trim
unbreakable
use_cooldown
use_remainder
weapon
writable_book_content
written_book_content
attribute_modifiers
Applies attribute modifiers onto items.
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT List / JSON Array] minecraft:attribute_modifiers: Contains attribute modifiers on this item which modify attributes of the wearer or holder (if the item is not in the hand or armor slots, it has no effect).
- [NBT Compound / JSON Object]: A single attribute modifier.
- [String] type: The name of the attribute this modifier is to act upon.
- [String] slot: Slot or slot type the item must be in for the modifier to take effect. Can be
any,hand,armor,mainhand,offhand,head,chest,legs,feetorbody. Defaults toany. - [String] id: The unique resource location to identify this modifier.
- [Double] amount: Amount of change from the modifier.
- [String] operation: Modifier operation. Can be
add_value,add_multiplied_baseoradd_multiplied_total. See Attribute Modifiers for info. - [NBT Compound / JSON Object] display: Optional display field.
- [String] type: Display type. Can be
default,hiddenoroverride. - [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.
- [String] type: Display type. Can be
- [NBT Compound / JSON Object]: A single attribute modifier.
- [NBT List / JSON Array] minecraft:attribute_modifiers: Contains attribute modifiers on this item which modify attributes of the wearer or holder (if the item is not in the hand or armor slots, it has no effect).
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.
banner_patterns
Applies banner patterns onto banners or shields.
- [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.
- [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
- [NBT Compound / JSON Object]: A single pattern.
- [NBT List / JSON Array] minecraft:banner_patterns: List of all patterns applied to the banner or the shield.
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
Defines the base (dye) color of a banner applied to a shield.
- [NBT Compound / JSON Object] components: Parent tag.
- [String] minecraft:base_color: The base dye color of the banner applied on a shield.
Example: /give @s shield[base_color="lime"]
- Gives a lime shield.
bees
Specifies the amount of bees and their time in the hive. It's also possible to set their entity data.
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT List / JSON Array] minecraft:bees: The entities currently in the beehive or bee nest.
- [NBT Compound / JSON Object]: A single entity.
- [NBT Compound / JSON Object] entity_data: The NBT data of the entity in the hive.
- See Entity format.
- [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.
- [NBT Compound / JSON Object] entity_data: The NBT data of the entity in the hive.
- [NBT Compound / JSON Object]: A single entity.
- [NBT List / JSON Array] minecraft:bees: The entities currently in the beehive or bee nest.
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
Defines the block entity NBT data applied to the block after it's placed.
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT Compound / JSON Object] minecraft:block_entity_data: Block entity NBT applied when this block is placed.
- See Block entity format. Excludes
x,y,z,id,componentsandkeepPackedtags.
- See Block entity format. Excludes
- [NBT Compound / JSON Object] minecraft:block_entity_data: Block entity NBT applied when this block is placed.
Example: /give @s spawner[block_entity_data={id:"mob_spawner",SpawnData:{entity:{id:"spider"}}}]
- Gives a spider spawner. Placing this spawner requires the player to have operator permissions.
block_state
Specifies block state properties applied to the block after it's placed.
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT Compound / JSON Object] minecraft:block_state: The block state properties to apply when placing this block.
- [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".
- [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
- [NBT Compound / JSON Object] minecraft:block_state: The block state properties to apply when placing this block.
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
Makes the item act like a shield, meaning it can block attacks when held.
- [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:weaponcomponent). If set to0, this item can never be disabled by attacks. Defaults to1. - [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
- [String][NBT List / JSON Array] type: Any number of damage type(s) (an [String] ID, or a [String] tag with
- [NBT Compound / JSON Object]: A damage reduction field
- [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.
- [Float] base: The constant amount of damage applied to the item, if threshold is passed.
- [Float] factor: The fraction of the dealt damage that should be applied to the item, if threshold is passed.
- [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.
- [Float] block_delay_seconds: The amount of time (in seconds) that use must be held before successfully blocking attacks. Defaults to
- [NBT Compound / JSON Object] minecraft:blocks_attacks: When present, this item can be used like a shield to block attacks to the holding player.
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
Changes the sound that plays when the item breaks.
- [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
- [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.
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
Specifies the entity NBT applied to an entity when placed down from a bucket. Note that only some NBT tags are applied.
- [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
NoAIentity tag for all bucketable entities. - [Boolean] Silent: Turns into
Silententity tag for all bucketable entities. - [Boolean] NoGravity: Turns into
NoGravityentity tag for all bucketable entities. - [Boolean] Glowing: Turns into
Glowingentity tag for all bucketable entities. - [Boolean] Invulnerable: Turns into
Invulnerableentity tag for all bucketable entities. - [Float] Health: Turns into
Healthentity tag for all bucketable entities. - [Int] Age: Turns into
Ageentity tag for axolotls and tadpoles. - [Int] Variant: Turns into
Variantentity tag for axolotls. - [Long] HuntingCooldown: Turns into the expiry time of the memory module
has_hunting_cooldownfor axolotls. - [Int] BucketVariantTag: Turns into
Variantentity tag for tropical fish. - [String] type: Turns into
typeentity tag for salmon.
- [Boolean] NoAI: Turns into
- [NBT Compound / JSON Object] minecraft:bucket_entity_data: NBT applied to an entity when placed from this bucket. Only tags below are applied.
Example: /give @s tropical_fish_bucket[bucket_entity_data={BucketVariantTag:117506305}]
- Gives a bucket of tropical fish that always has the Anemone type.
bundle_contents
Defines the items and their data stored inside a bundle.
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT List / JSON Array] minecraft:bundle_contents: The items stored inside this bundle.
- [NBT Compound / JSON Object]: A single item stack.
- A single item stack see Template:Nbt inherit/itemnoslot/template
- [NBT Compound / JSON Object]: A single item stack.
- [NBT List / JSON Array] minecraft:bundle_contents: The items stored inside this bundle.
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. When the [String][NBT List / JSON Array] blocks field is not specified, the item's tooltip displays that it can break "Unknown".
- [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.
- [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. - [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".
- [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
- [String][NBT List / JSON Array] blocks: Can be a block ID or a block tag with a
- [NBT Compound / JSON Object]: A single block predicate.
- [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.
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. When the [String][NBT List / JSON Array] blocks field is not specified, the item's tooltip displays that it can be placed on "Unknown".
- [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.
- [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. - [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".
- [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
- [String][NBT List / JSON Array] blocks: Can be a block ID or a block tag with a
- [NBT Compound / JSON Object]: A single block predicate.
- [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.
Example: /give @s target[can_place_on={blocks:'sandstone'}]
- Gives a target block that can only be placed on sandstone.
charged_projectiles
Defines the items and projectiles loaded into this crossbow. This component needs to be present for this crossbow to be charged.
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT List / JSON Array] minecraft:charged_projectiles: The items loaded as projectiles into this crossbow. 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
- [NBT Compound / JSON Object]: A single projectile item stack.
- [NBT List / JSON Array] minecraft:charged_projectiles: The items loaded as projectiles into this crossbow. If not present, this crossbow is not charged.
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.
- If the item already has an existing right-click functionality (like placing a block), it keeps that functionality.
- If the
food,potion_contents,ominous_bottle_amplifierorsuspicious_stew_effectscomponents are also present on this item, consuming it applies the stats and effects of those components.
- [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_hornorbrush. Defaults toeat. - [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
- [NBT Compound / JSON Object]: A single consume effect.
- [NBT Compound / JSON Object] minecraft:consumable: If present, this item can be consumed on use.
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
Defines the items stored in a container item.
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT List / JSON Array] minecraft:container: The items contained in this container.
- [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 between 0 and 255 (inclusive).
- [NBT Compound / JSON Object] item: The item stack in this slot.
- [NBT Compound / JSON Object]: A single item.
- [NBT List / JSON Array] minecraft:container: The items contained in this container.
Example: /give @s barrel[container=[{slot:0,item:{id:apple}}]]
- Gives a barrel with an apple in the first slot.
container_loot
Defines the loot table present in a container item.
- [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.
- [NBT Compound / JSON Object] minecraft:container_loot: The unresolved loot table and seed of this container item.
Example: /give @s chest[container_loot={loot_table:"chests/desert_pyramid"}]
- Gives a chest that contains the desert pyramid loot when opened.
custom_data
Store custom data on the item.
- [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.
- [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.
Example: /give @s iron_sword[custom_data={foo:1}]
- Gives an iron sword with custom data
{foo:1}.
custom_model_data
Specifies the custom model data, which can be read by a resource pack's model by items model definition.
- [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_dispatchmodel type. Missing values return thefallbackmodel. - [Byte Array] flags: A list of [Boolean] booleans for the
conditionmodel type. Missing value returns theis_falsemodel. - [NBT List / JSON Array] strings: A list of [String] strings for the
selectmodel type. Missing value returns thefallbackmodel. - [NBT List / JSON Array][Int Array] colors: A list of RGB values for the
modelmodel type'stints. Missing values return thedefaultvalue 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 + BlueAn 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.
- [Int]: An RGB color code converted to a decimal number. It can be calculated from the Red, Green and Blue components using this formula:
- [NBT List / JSON Array] floats: A list of [Float] floats for the
- [NBT Compound / JSON Object] minecraft:custom_model_data: A list of values used by items model definitions for model selection and coloring.
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
colorslist 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
item_namecomponent - 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
Specifies the amount of durability lost (not remaining) from the item.
- [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.
Example: /give @s diamond_axe[damage=500]
- Gives a diamond axe with 500 points of damage.
damage_resistant
Items with this component, when thrown on the ground, are resistant to the damage types included in the component's damage tag.
This component also affects whether the equipped item is damaged when the wearer is hurt by the given damage type.
- [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.
- [String] types: A damage type tag prefixed with
#.
- [String] types: A damage type tag prefixed with
- [NBT Compound / JSON Object] minecraft:damage_resistant: If specified, this item is invulnerable to the specified damage types when in entity form or equipped.
debug_stick_state
Used by the debug stick item to store the selected block state properties.
- [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".
- [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
- [NBT Compound / JSON Object] minecraft:debug_stick_state: The selected block state properties used by this debug stick.
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
westand the candle block state property set tolit.
death_protection
If present, this item acts like a totem of undying, by reviving the holder of this item.
- [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
- [NBT Compound / JSON Object]: A single consume effect.
- [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] minecraft:death_protection: If present, this item protects the holder from dying by restoring a single health point.
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.
dyed_color
Defines the color of this leather armor piece.
- [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:dyecolor provider in item model definitions. 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.
- [Int] minecraft:dyed_color: The color applied of this leather armor or wolf armor item. More generally, it is used as the
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
Defines whether the item can be enchanted in an enchanting table. This only applies if there are applicable enchantments available for that item.
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT Compound / JSON Object] minecraft:enchantable: If present, and applicable enchantments are available, items with the component 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.
- [NBT Compound / JSON Object] minecraft:enchantable: If present, and applicable enchantments are available, items with the component can be enchanted in an enchanting table.
Example: /give @s elytra[enchantable={value:15}]
- Gives an 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. Whenfalse, this item does not display a glint, even with enchantments.
- [Boolean] minecraft:enchantment_glint_override: Overrides the enchantment glint effect on this item. When
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
Specifies the enchantments on this item.
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT Compound / JSON Object] minecraft:enchantments: Contains key-value pairs of levels of enchantments on this item that affect the way the item works.
- [Int] <enchantment ID>: A single key-value pair, where the key is the resource location of an enchantment, and the value is the level.
- [NBT Compound / JSON Object] minecraft:enchantments: Contains key-value pairs of levels of enchantments on this item that affect the way the item works.
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
Specifies the NBT data of an entity that is spawned/created from this item (e.g. armor stand, spawn egg, etc)
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT Compound / JSON Object] minecraft:entity_data: NBT applied to an entity when created from an item.
- See Entity format. Must include
idtag.
- See Entity format. Must include
- [NBT Compound / JSON Object] minecraft:entity_data: NBT applied to an entity when created from an item.
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,offhandorsaddle - [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 and or Entity Size, 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.
- [String] slot: The slot to put the item on. Can be one of
- [NBT Compound / JSON Object] minecraft:equippable: If present, this item can be equipped in the specified slot.
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
The firework explosion effect stored inside of this firework star (not a firework rocket. For that see the fireworks component).
- [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,creeperorburst. - [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).
- [String] shape: The shape of the explosion. Can be
- [NBT Compound / JSON Object] minecraft:firework_explosion: The explosion effect stored by this firework star.
fireworks
The firework explosion effects stored inside of this firework rocket (not a firework star, for that see the firework_explosion component).
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT Compound / JSON Object] minecraft:fireworks
- [NBT List / JSON Array] explosions: List of the explosion effects caused by this firework rocket. Has a maximum of 256 explosions.
- [NBT Compound / JSON Object]: A single explosion effect.
- [String] shape: The shape of the explosion. Can be
small_ball,large_ball,star,creeperorburst. - [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).
- [String] shape: The shape of the explosion. Can be
- [NBT Compound / JSON Object]: A single explosion effect.
- [Byte] flight_duration: The flight duration of this firework rocket, i.e. the number of gunpowders used to craft it. Must be an integer between -128 and 127. Defaults to 1.
- [NBT List / JSON Array] explosions: List of the explosion effects caused by this firework rocket. Has a maximum of 256 explosions.
- [NBT Compound / JSON Object] minecraft:fireworks
food
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT Compound / JSON Object] minecraft:food: The food stats for this consumable item. Has no effect unless the item can be consumed (i.e. the item has the
consumablecomponent).- [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 tofalse.
- [NBT Compound / JSON Object] minecraft:food: The food stats for this consumable item. Has no effect unless the item can be consumed (i.e. the item has the
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
Specifies the instrument of a goat horn.
- [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).
- [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.
- [String][NBT Compound / JSON Object] minecraft:instrument: One instrument (an [String] ID, or a new [NBT Compound / JSON Object] instrument definition).
Example: /give @s goat_horn[instrument="feel_goat_horn"]
- Gives a goat horn that plays the Feel 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
Defines the item model of this item.
- [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
custom_namecomponent, 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.
- [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
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. Presence of this component allows the item can be inserted into a jukebox to play the specified song.
Example: /give @s diamond[minecraft:jukebox_playable="pigstep"]
- Gives a diamond that plays Pigstep when inserted into a jukebox
lock
Locks a container to a certain "key". The "key" must be an item with the same data as the container item's 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
- [NBT Compound / JSON Object] minecraft:lock: An item predicate representing the "key" to open this container item.
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: If specified, stores information about the lodestone this compass should point toward.
- [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. Iffalse, the component is kept. Defaults totrue.
- [NBT Compound / JSON Object] target: Information about the lodestone. Optional. If not set, this compass spins randomly.
- [NBT Compound / JSON Object] minecraft:lodestone_tracker: If specified, stores information about the lodestone this compass should point toward.
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
Specifies the item's lore - that being the description of an item.
- [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.
- [NBT List / JSON Array] minecraft:lore: List of additional lines to display in this item's tooltip. Has a maximum of 256 lines.
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
Defines the color of the markings on the item of this map (not the actual map when viewed).
- [NBT Compound / JSON Object] components: Parent tag.
- [Int] minecraft:map_color: The color of the markings on this filled map item texture.
Example: /give @s filled_map[map_color=16711680]
- Gives a filled map with red markings on item texture.
map_decorations
Contains the icons that are displayed on this filled map (e.g. the structures on an explorer map).
- [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_templeorswamp_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.
- [String] type: The type of the icon. Can be
- [NBT Compound / JSON Object] <key>: The key-value pair of a single icon, where the key is an arbitrary unique string identifying the decoration.
- [NBT Compound / JSON Object] minecraft:map_decorations: Contains key-value pairs of the icons to display on this filled map.
map_id
The id of the map to show. Maps are stored in .minecraft\saves\<world_name>\data and have file names such as map_1.dat.
- [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 positive integer. Cannot be combined with
max_stack_sizeif it has a value greater than 1 (if the item can be stacked). For the durability bar to apear, the damage component must have a value. Example "damage=0"
- [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 positive integer. Cannot be combined with
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
max_damage.
- [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
Example: /give @s acacia_boat[max_stack_size=64] 5
- Gives a stack of 5 acacia boats all in a single slot.
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 amount of the Bad Omen effect on this ominous bottle. Must be a positive integer between 0 and 4 (inclusive).
pot_decorations
Defines the sherds applied on a decorated pot.
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT List / JSON Array] minecraft:pot_decorations: A list of the sherds applied on each face of this decorated pot. If the list has less than 4 entries, the remaining ones default to
"minecraft:brick".- [String]: The ID of an item. Can be either
brickor a sherd.
- [String]: The ID of an item. Can be either
- [NBT List / JSON Array] minecraft:pot_decorations: A list of the sherds applied on each face of this decorated pot. If the list has less than 4 entries, the remaining ones default to
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 potion and custom effects contained in this potion, splash potion, lingering potion, or tipped arrow. 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 theminecraft:item_namecomponent, but lower than theminecraft:custom_namecomponent. - [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 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.
- [NBT Compound / JSON Object]: A single custom effect.
- [String][NBT Compound / JSON Object] minecraft:potion_contents: The potion and custom effects contained in this potion, splash potion, lingering potion, or tipped arrow. If defined as a string, corresponds to [String] potion.
potion_duration_scale
- [NBT Compound / JSON Object] components: Parent tag.
- [Float] minecraft:potion_duration_scale: When present, for items that have the
minecraft:potion_contentscomponent, the duration of the applied effects is scaled by this factor. Defaults to1.0.
- [Float] minecraft:potion_duration_scale: When present, for items that have the
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: Information about the owner of this player head. If defined as a string, corresponds to [String] name.
- [String] name: The name of a player profile, i.e. its username. If this is the only tag provided, it resolves into the other ones below. Optional.
- [Int Array] id: The UUID of the owner. Used to update the other tags when the chunk loads or the holder logs in, in case the owner's name has changed. 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.
- [String] name: The name of the property. Can be
- [NBT Compound / JSON Object]: A single property.
- [String][NBT Compound / JSON Object] minecraft:profile: Information about the owner of this player head. If defined as a string, corresponds to [String] name.
Example: /give @p player_head[profile=MinecraftWiki]
- Gives a player head of MinecraftWiki.
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
#.
- [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 3]
rarity
Defines the rarity of the item. Setting a rarity changes the color of its default name. common is white, uncommon is yellow, rare is aqua and epic is light purple.
- [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,rareorepic.
- [String] minecraft:rarity: Sets the rarity of this item, which affects the default color of its name. Can be
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.
- [String]: The ID of a recipe.
- [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.
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.
- [NBT Compound / JSON Object] minecraft:repairable: Allows the item to be repaired, if damageable, in an anvil using the specified ingredient.
Example: /give @p diamond_sword[repairable={items:"stick"}]
- Gives a diamond sword that can be repaired with sticks in an anvil.
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.
stored_enchantments
Defines the stored enchantments on this item.
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT Compound / JSON Object] minecraft:stored_enchantments: Contains key-value pairs of levels of enchantments stored on this enchanted book.
- [Int] <enchantment ID>: A single key-value pair, where the key is the resource location of an enchantment, and the value is the level.
- [NBT Compound / JSON Object] minecraft:stored_enchantments: Contains key-value pairs of levels of enchantments stored on this enchanted book.
suspicious_stew_effects
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT List / JSON Array] minecraft:suspicious_stew_effects: The effects applied when consuming this suspicious stew.
- [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.
- [NBT Compound / JSON Object]: A single custom effect.
- [NBT List / JSON Array] minecraft:suspicious_stew_effects: The effects applied when consuming this suspicious stew.
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.
- [String][NBT List / JSON Array] blocks: The blocks to match with. Can be a block ID or a block tag with a
- [NBT Compound / JSON Object]: A single rule.
- [NBT Compound / JSON Object] minecraft:tool: If set, this item is considered as a tool.
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
Hides any tooltips provided by the specified components on this item.
- [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.
- [String]: The resource location of a component
- [NBT Compound / JSON Object] minecraft:tooltip_display: Allows the tooltips provided specifically by any given item component to be suppressed.
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
Changes the item's tooltip style by specifying the direct path to a custom tooltip texture in a resource pack.
- [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
Stores the trims applied on this piece of armor.
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT Compound / JSON Object] minecraft:trim: Contains the trim applied to this armor piece.
- [String] pattern: The ID of the trim pattern.
- [String] material: The ID of the trim material, which applies a color to the trim.
- [NBT Compound / JSON Object] minecraft:trim: Contains the trim applied to this armor piece.
Example: /give @p minecraft:leather_leggings[trim={"pattern":"host","material":"emerald"}] 1
- Gives leather pants with the "host" pattern made of emerald.
unbreakable
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT Compound / JSON Object] minecraft:unbreakable: If set, this item doesn't lose durability when used.
use_cooldown
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT Compound / JSON Object] minecraft:use_cooldown: If present, this item applies a cooldown to all items of the same type when it has been used.
- [Float] seconds: The cooldown duration in seconds.
- [String] cooldown_group: The unique resource location to identify this cooldown group. If present, the item is included in a cooldown group and no longer shares cooldowns with its base item type, but instead with any other items that are part of the same cooldown group. Optional.
- [NBT Compound / JSON Object] minecraft:use_cooldown: If present, this item applies a cooldown to all items of the same type when it has been used.
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 differentseconds, then using that item applies thesecondsof itself to all other items in the inventory, rather than each item applying their ownsecondsto themselves.
- If other items in the inventory share the same
- Items can have their cooldowns disabled completely by removing the component with
[!use_cooldown].
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
- [NBT Compound / JSON Object] minecraft:use_remainder: If present, replaces the item with a remainder item if its stack count has decreased after use.
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 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.
- [Int] item_damage_per_attack: The amount to damage the item for each attack performed. Defaults to
- [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.
Example 1: /give @p minecraft:stick[weapon={},max_damage=10]
- 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
Defines the content written in this book and quill.
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT Compound / JSON Object] minecraft:writable_book_content: The contents of this book and quill.
- [NBT List / JSON Array] pages: A list of the pages in the book.
- [NBT Compound / JSON Object]: A single page.
- [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] text.
- Alternatively, a single page can be represented as follows:
- [String]: The plain text content of a page.
- [NBT Compound / JSON Object]: A single page.
- [NBT List / JSON Array] pages: A list of the pages in the book.
- [NBT Compound / JSON Object] minecraft:writable_book_content: The contents of this book and quill.
written_book_content
Defines the content and metadata in this written book.
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT Compound / JSON Object] minecraft:written_book_content: The contents and metadata of this written book.
- [NBT List / JSON Array] pages: A list of the pages in the book.
- [NBT Compound / JSON Object]: A single page.
- [String][NBT List / JSON Array][NBT Compound / JSON Object] raw: The text component representing the text content of the page. See Text component format.
- [String][NBT List / JSON Array][NBT Compound / JSON Object] filtered: The Text component representing the filtered text of the page. Optional. Shown only to players with chat filter enabled, instead of [String] text.
- Alternatively, a single page can be represented as follows:
- [String][NBT List / JSON Array][NBT Compound / JSON Object]: The text component representing the text content of the page.
- [NBT Compound / JSON Object]: A single page.
- [NBT Compound / JSON Object] title: The title of this written book.
- [String] raw: The plain text title.
- [String] filtered: The filtered title. Optional. Shown only to players with chat filter enabled, instead of [String] text.
- [String] author: The author of this written book.
- [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.
- [Boolean] resolved: If
true, the text components have already been resolved (such as entity selectors and scores). Iffalse, they are resolved when this book is opened by a player for the first time. Defaults tofalse.
- [NBT List / JSON Array] pages: A list of the pages in the book.
- [NBT Compound / JSON Object] minecraft:written_book_content: The contents and metadata of this written book.
Entity variant components
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
cat/collar
cat/variant
chicken/variant
cow/variant
fox/variant
frog/variant
horse/variant
llama/variant
mooshroom/variant
parrot/variant
painting/variant
pig/variant
rabbit/variant
salmon/size
sheep/color
shulker/color
tropical_fish/base_color
tropical_fish/pattern
tropical_fish/pattern_color
villager/variant
wolf/collar
wolf/sound_variant
wolf/variant
axolotl/variant
- [NBT Compound / JSON Object] components: Parent tag.
- [String] minecraft:axolotl/variant:
lucy,wild,gold,cyan, orblue— The variant of the axolotl
- [String] minecraft:axolotl/variant:
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:
redorsnow— The variant of the fox
- [String] minecraft:fox/variant:
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, ordark_brown— The variant of the horse
- [String] minecraft:horse/variant:
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, orgray— The variant of the llama
- [String] minecraft:llama/variant:
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:
redorbrown— The variant of the mooshroom
- [String] minecraft:mooshroom/variant:
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
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, orgray— The variant of the parrot
- [String] minecraft:parrot/variant:
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, orevil— The variant of the rabbit
- [String] minecraft:rabbit/variant:
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
- [String] minecraft:salmon/size:
Example: /give @s salmon_spawn_egg[salmon/size="large"]
- Gives a salmon spawn egg that spawns a large salmon.
sheep/color
Example: /give @s sheep_spawn_egg[sheep/color="blue"]
- Gives a sheep spawn egg that spawns a sheep with blue wool.
shulker/color
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.
- [String] minecraft:tropical_fish/base_color: A dye color — The base color of the tropical fish
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, orclayfish— The pattern of the tropical fish
- [String] minecraft:tropical_fish/pattern:
tropical_fish/pattern_color
- [NBT Compound / JSON Object] components: Parent tag.
- [String] minecraft:tropical_fish/pattern_color: A dye color — The pattern color of the tropical fish
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, ortaiga— The variant of the villager
- [String] minecraft:villager/variant:
Example: /give @s villager_spawn_egg[villager/variant="desert"]
- Gives a villager spawn egg that spawns a desert villager.
wolf/collar
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
Two other 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.
Exclusive to joke versions
The following components were added and used in the April Fools' Day joke snapshot 24w14potato in 2024.
clicks
- [NBT Compound / JSON Object] components: Parent tag.
- [Int] minecraft:clicks: The number of times this poisonous potato plant has been clicked in the inventory.
contacts_messages
- [NBT Compound / JSON Object] components: Parent tag.
- [Long Array] minecraft:contacts_messages: Used by the poisonous potato plant.
explicit_foil
- [NBT Compound / JSON Object] components: Parent tag.
- [Boolean] minecraft:explicit_foil: Whether or not this item should display a glint.
fletching
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT Compound / JSON Object] minecraft:fletching: Information about this fletching table.
- [String] quality: A single character defining the quality of this block.
- [String] impurities: A single character defining the impurity of this block.
- [String] next_level_impurities: A single character defining the impurity of the next level of this block.
- [Short] processs_time: The process time of this block, in ticks.
- [Boolean] explored: Whether this block has been explored.
- [NBT Compound / JSON Object] minecraft:fletching: Information about this fletching table.
heat
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT Compound / JSON Object] minecraft:heat: Information about this hot potato.
- [Int] heat: The amount of heat. Has a maximum value of 200.
- [Int] slot: The inventory slot this item is in.
- [Int Array] owner: The UUID of the entity currently holding this item.
- [NBT Compound / JSON Object] minecraft:heat: Information about this hot potato.
hovered
- [NBT Compound / JSON Object] components: Parent tag.
- [Boolean] minecraft:hovered: Whether or not this poisonous potato plant is the last item stack hovered in the inventory.
lubrication
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT Compound / JSON Object] minecraft:lubrication
- [Int] level: The level of slipperiness this item has when thrown on the ground.
- [NBT Compound / JSON Object] minecraft:lubrication
potato_bane
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT Compound / JSON Object] minecraft:potato_bane: Used by the potato peeler.
- [Float] damage_boost: The amount of bonus damage applied to potato mobs.
- [NBT Compound / JSON Object] minecraft:potato_bane: Used by the potato peeler.
resin
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT Compound / JSON Object] minecraft:resin: Information about this toxic resin.
- [String] quality: A single character defining the quality of this item. Used to prefix the "Clarity" line on the tooltip.
- [String] impurities: A single character defining the impurity of this item. Used to prefix the "Impurities" line on the tooltip.
- [NBT Compound / JSON Object] minecraft:resin: Information about this toxic resin.
secret_message
- [NBT Compound / JSON Object] components: Parent tag.
- [Long] minecraft:secret_message: Used by the poisonous potato plant.
snek
- [NBT Compound / JSON Object] components: Parent tag.
- [NBT Compound / JSON Object] minecraft:snek: Information about this snektato.
- [Boolean] revealed: Whether or not this item has been eaten yet. When
true, its name is "Venomous Potato" and its texture is different.
- [Boolean] revealed: Whether or not this item has been eaten yet. When
- [NBT Compound / JSON Object] minecraft:snek: Information about this snektato.
undercover_id
- [NBT Compound / JSON Object] components: Parent tag.
- [Int] minecraft:undercover_id: Used by the poisonous potato plant.
views
- [NBT Compound / JSON Object] components: Parent tag.
- [Int] minecraft:views: Used by the poisonous potato plant.
xp
- [NBT Compound / JSON Object] components: Parent tag.
- [Int] minecraft:xp: The amount of experience points granted by this potato of knowledge.
History
| Java Edition | |||||||
|---|---|---|---|---|---|---|---|
| 1.20.5 | 24w09a | Replaced [NBT Compound / JSON Object] tag tag and all underlying item-specific tags with data components. | |||||
| Replaced [Byte] Count with [Int] count. | |||||||
| 24w10a | Renamed 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. | |||||||
| 24w12a | Added 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. | |||||||
| 24w13a | Added item_name, and ominous_bottle_amplifier components.
| ||||||
| Components with non-default values on block items are now stored on block entities when placed. | |||||||
| 24w14a | Renamed [String] text to [String] raw in writable_book_content, and written_book_content components. | ||||||
| Pre-Release 1 | Renamed [Float] saturation_modifier to [Float] saturation in food component.
| ||||||
max_damage, and max_stack_size components can no longer be put together. | |||||||
| 1.21 | 24w19a | custom_data component can now be defined as a SNBT string.
| |||||
Added [NBT Compound / JSON Object] using_converts_to in food component. | |||||||
| 24w21a | Added jukebox_playable component.
| ||||||
Changed attribute_modifiers component: removed [String] name and [Int Array] uuid fields, added [String] id field. | |||||||
| 1.21.2 | 24w33a | Added 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. | |||||||
| 24w34a | Added 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. | |||||||
| 24w36a | Added equippable, item_model, glider and tooltip_style components.
| ||||||
The item_name component is now always present on every item. | |||||||
| 24w37a | Added 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. | |||||||
| 24w39a | The lock component is now a compound that represents an item predicate. | ||||||
| Pre-Release 1 | Added [String] camera_overlay in equippable component. | ||||||
| 1.21.4 | 24w45a | custom_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. | |||||||
| 1.21.5 | 25w02a | Added 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. | |||||||
| 25w04a | Added 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} | |||||||
| 25w05a | Added [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. | |||||||
| 25w06a | Added chicken/variant entity variant component. | ||||||
| 25w08a | Added wolf/sound_variant entity variant component. | ||||||
| 1.21.6 | 25w15a | Added optional [NBT Compound / JSON Object] display field to attributes_modifiers. | |||||
| 25w16a | The painting/variant component no longer allows inline paining variant definitions. | ||||||
| 25w20a | Added optional [Boolean] can_be_sheared and [String][NBT Compound / JSON Object] shearing_sound fields to equippable. | ||||||
Notes
| |||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||