Minecraft:Java Edition protocol/Slot data: Difference between revisions
More actions
Sync: new page from Minecraft |
Sync: updated from Minecraft |
||
| Line 3: | Line 3: | ||
This page presents the new Slot data structure, using structured components. You can find the documentation of the old structure, that utilizes raw NBT data, [[Special:Permalink/2768623|here]]. | This page presents the new Slot data structure, using structured components. You can find the documentation of the old structure, that utilizes raw NBT data, [[Special:Permalink/2768623|here]]. | ||
= Format = | == Format == | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 16: | Line 16: | ||
| colspan="2"| Item ID | | colspan="2"| Item ID | ||
| colspan="2"| {{Type|Optional}} {{Type|VarInt}} | | colspan="2"| {{Type|Optional}} {{Type|VarInt}} | ||
| | | ID in the <code>minecraft:item</code> registry. Item IDs are distinct from block IDs; see [[Minecraft:Minecraft Wiki:Projects/wiki.vg merge/Data Generators|Data Generators]] for more information. | ||
|- | |- | ||
| colspan="2"| Number of components to add | | colspan="2"| Number of components to add | ||
| Line 30: | Line 30: | ||
| rowspan="2"| {{Type|Optional}} {{Type|Array}} | | rowspan="2"| {{Type|Optional}} {{Type|Array}} | ||
| {{Type|VarInt}} {{Type|Enum}} | | {{Type|VarInt}} {{Type|Enum}} | ||
| colspan="2"| | | colspan="2"| ID in the <code>minecraft:data_component_type</code> registry, indicating the type of the component and the format of data to follow. | ||
|- | |- | ||
| Component data | | Component data | ||
| Varies | | Varies | ||
| colspan="1"| The component-dependent data. See [[# | | colspan="1"| The component-dependent data. See [[#Structured components|structured components]] for more detail. | ||
|- | |- | ||
| rowspan="1"| Components to remove | | rowspan="1"| Components to remove | ||
| Line 40: | Line 40: | ||
| rowspan="1"| {{Type|Optional}} {{Type|Array}} | | rowspan="1"| {{Type|Optional}} {{Type|Array}} | ||
| {{Type|VarInt}} {{Type|Enum}} | | {{Type|VarInt}} {{Type|Enum}} | ||
| colspan="2"| | | colspan="2"| ID in the <code>minecraft:data_component_type</code> registry, indicating the type of the component. | ||
|- | |- | ||
|} | |} | ||
== Hashed format == | |||
= Hashed | |||
Similar to [[#Format|the usual slot format]], but with the notable difference that data component values are encoded as CRC32C (note: CRC32C is not the same thing as CRC32) checksums. The way the checksum is generated is currently undocumented. It's currently only used in the [[Minecraft:Java_Edition_protocol/Packets#Click_Container|click container]] packet. | Similar to [[#Format|the usual slot format]], but with the notable difference that data component values are encoded as CRC32C (note: CRC32C is not the same thing as CRC32) checksums. The way the checksum is generated is currently undocumented. It's currently only used in the [[Minecraft:Java_Edition_protocol/Packets#Click_Container|click container]] packet. | ||
| Line 60: | Line 59: | ||
| colspan="2"| Item ID | | colspan="2"| Item ID | ||
| colspan="2"| {{Type|Optional}} {{Type|VarInt}} | | colspan="2"| {{Type|Optional}} {{Type|VarInt}} | ||
| | | ID in the <code>minecraft:item</code> registry. Item IDs are distinct from block IDs; see [[Minecraft:Minecraft Wiki:Projects/wiki.vg merge/Data Generators|Data Generators]] for more information. | ||
|- | |- | ||
| colspan="2"| Item Count | | colspan="2"| Item Count | ||
| Line 70: | Line 69: | ||
| rowspan="2"| {{Type|Optional}} {{Type|Prefixed Array}} | | rowspan="2"| {{Type|Optional}} {{Type|Prefixed Array}} | ||
| {{Type|VarInt}} {{Type|Enum}} | | {{Type|VarInt}} {{Type|Enum}} | ||
| colspan="2"| | | colspan="2"| ID in the <code>minecraft:data_component_type</code> registry, indicating the type of the component. | ||
|- | |- | ||
| Component data hash | | Component data hash | ||
| Line 80: | Line 79: | ||
| rowspan="1"| {{Type|Optional}} {{Type|Prefixed Array}} | | rowspan="1"| {{Type|Optional}} {{Type|Prefixed Array}} | ||
| {{Type|VarInt}} {{Type|Enum}} | | {{Type|VarInt}} {{Type|Enum}} | ||
| colspan="2"| | | colspan="2"| ID in the <code>minecraft:data_component_type</code> registry, indicating the type of the component. | ||
|- | |- | ||
|} | |} | ||
= Structured components = | == Structured components == | ||
The complete list of available components is described below. | The complete list of available components is described below. | ||
For a more in-depth description, and information on how the items below are encoded with the NBT format, | For a more in-depth description, and information on how the items below are encoded with the NBT format, see [[Minecraft:Data component format]]. | ||
{| class="wikitable" | {| class="wikitable" | ||
! Name | ! Name | ||
! Description | ! Description | ||
! style="width: 50%" | Data | ! style="width: 50%" | Data | ||
|- | |- | ||
| <code>minecraft:custom_data</code> | | <code>minecraft:custom_data</code> | ||
| Customizable data that doesn't fit any specific component. | | Customizable data that doesn't fit any specific component. | ||
| Line 110: | Line 107: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:max_stack_size</code> | | <code>minecraft:max_stack_size</code> | ||
| Maximum stack size for the item. | | Maximum stack size for the item. | ||
| Line 124: | Line 120: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:max_damage</code> | | <code>minecraft:max_damage</code> | ||
| The maximum damage the item can take before breaking. | | The maximum damage the item can take before breaking. | ||
| Line 138: | Line 133: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:damage</code> | | <code>minecraft:damage</code> | ||
| The current damage of the item. | | The current damage of the item. | ||
| Line 152: | Line 146: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:unbreakable</code> | | <code>minecraft:unbreakable</code> | ||
| Marks the item as unbreakable. | | Marks the item as unbreakable. | ||
| ''no fields'' | | ''no fields'' | ||
|- | |- | ||
| <code>minecraft:custom_name</code> | | <code>minecraft:custom_name</code> | ||
| Item's custom name.<br>Normally shown in italic, and changeable at an anvil. | | Item's custom name.<br>Normally shown in italic, and changeable at an anvil. | ||
| Line 171: | Line 163: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:item_name</code> | | <code>minecraft:item_name</code> | ||
| Override for the item's default name.<br>Shown when the item has no custom name. | | Override for the item's default name.<br>Shown when the item has no custom name. | ||
| Line 185: | Line 176: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:item_model</code> | | <code>minecraft:item_model</code> | ||
| Item's model. | | Item's model. | ||
| Line 199: | Line 189: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:lore</code> | | <code>minecraft:lore</code> | ||
| Item's lore. | | Item's lore. | ||
| Line 213: | Line 202: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:rarity</code> | | <code>minecraft:rarity</code> | ||
| Item's rarity.<br>This affects the default color of the item's name. | | Item's rarity.<br>This affects the default color of the item's name. | ||
| Line 231: | Line 219: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:enchantments</code> | | <code>minecraft:enchantments</code> | ||
| The enchantments of the item. | | The enchantments of the item. | ||
| Line 251: | Line 238: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:can_place_on</code> | | <code>minecraft:can_place_on</code> | ||
| List of blocks this block can be placed on when in adventure mode. | | List of blocks this block can be placed on when in adventure mode. | ||
| Line 265: | Line 251: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:can_break</code> | | <code>minecraft:can_break</code> | ||
| List of blocks this item can break when in adventure mode. | | List of blocks this item can break when in adventure mode. | ||
| Line 279: | Line 264: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:attribute_modifiers</code> | | <code>minecraft:attribute_modifiers</code> | ||
| The attribute modifiers of the item. | | The attribute modifiers of the item. | ||
| Line 324: | Line 308: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:custom_model_data</code> | | <code>minecraft:custom_model_data</code> | ||
| Value for the item predicate when using custom item models.<br>More info can be found [https://minecraft.wiki/w/Tutorials/Models#Item_predicates here]. | | Value for the item predicate when using custom item models.<br>More info can be found [https://minecraft.wiki/w/Tutorials/Models#Item_predicates here]. | ||
| Line 350: | Line 333: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:tooltip_display</code> | | <code>minecraft:tooltip_display</code> | ||
| Allows you to hide all or parts of the item tooltip. | | Allows you to hide all or parts of the item tooltip. | ||
| Line 368: | Line 350: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:repair_cost</code> | | <code>minecraft:repair_cost</code> | ||
| Accumulated anvil usage cost. The client displays "Too Expensive" if the value is greater than 40 and the player is not in creative mode (more specifically, if they don't have the [[Minecraft:Minecraft Wiki:Projects/wiki.vg merge/Protocol#Player_Abilities_(clientbound)|insta-build flag enabled]]).<br>This behavior can be overridden by setting the level with the [[Minecraft:Minecraft Wiki:Projects/wiki.vg merge/Protocol#Set_Container_Property|Set Container Property]] packet. | | Accumulated anvil usage cost. The client displays "Too Expensive" if the value is greater than 40 and the player is not in creative mode (more specifically, if they don't have the [[Minecraft:Minecraft Wiki:Projects/wiki.vg merge/Protocol#Player_Abilities_(clientbound)|insta-build flag enabled]]).<br>This behavior can be overridden by setting the level with the [[Minecraft:Minecraft Wiki:Projects/wiki.vg merge/Protocol#Set_Container_Property|Set Container Property]] packet. | ||
| Line 382: | Line 363: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:creative_slot_lock</code> | | <code>minecraft:creative_slot_lock</code> | ||
| Marks the item as non-interactive on the creative inventory (the first 5 rows of items).<br>This is used internally by the client on the paper icon in the saved hot-bars tab. | | Marks the item as non-interactive on the creative inventory (the first 5 rows of items).<br>This is used internally by the client on the paper icon in the saved hot-bars tab. | ||
| ''no fields'' | | ''no fields'' | ||
|- | |- | ||
| <code>minecraft:enchantment_glint_override</code> | | <code>minecraft:enchantment_glint_override</code> | ||
| Overrides the item glint resulted from enchantments | | Overrides the item glint resulted from enchantments | ||
| Line 401: | Line 380: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:intangible_projectile</code> | | <code>minecraft:intangible_projectile</code> | ||
| Marks the projectile as intangible (cannot be picked-up). | | Marks the projectile as intangible (cannot be picked-up). | ||
| Line 415: | Line 393: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:food</code> | | <code>minecraft:food</code> | ||
| Makes the item restore the player's hunger bar when consumed. | | Makes the item restore the player's hunger bar when consumed. | ||
| Line 437: | Line 414: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:consumable</code> | | <code>minecraft:consumable</code> | ||
| Makes the item consumable. | | Makes the item consumable. | ||
| Line 467: | Line 443: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:use_remainder</code> | | <code>minecraft:use_remainder</code> | ||
| This specifies the item produced after using the current item. In the Notchian server, this is used for stews, which turn into bowls. | | This specifies the item produced after using the current item. In the Notchian server, this is used for stews, which turn into bowls. | ||
| Line 481: | Line 456: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:use_cooldown</code> | | <code>minecraft:use_cooldown</code> | ||
| Cooldown to apply on use of the item. | | Cooldown to apply on use of the item. | ||
| Line 499: | Line 473: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:damage_resistant</code> | | <code>minecraft:damage_resistant</code> | ||
| Marks this item as damage resistant.<br>The client won't render the item as being on-fire if this component is present. | | Marks this item as damage resistant.<br>The client won't render the item as being on-fire if this component is present. | ||
| Line 513: | Line 486: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:tool</code> | | <code>minecraft:tool</code> | ||
| Alters the speed at which this item breaks certain blocks | | Alters the speed at which this item breaks certain blocks | ||
| Line 549: | Line 521: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:weapon</code> | | <code>minecraft:weapon</code> | ||
| Item treated as a weapon | | Item treated as a weapon | ||
| Line 566: | Line 537: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:enchantable</code> | | <code>minecraft:enchantable</code> | ||
| Allows the item to be enchanted by an enchanting table. | | Allows the item to be enchanted by an enchanting table. | ||
| Line 580: | Line 550: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:equippable</code> | | <code>minecraft:equippable</code> | ||
| Allows the item to be equipped by the player. | | Allows the item to be equipped by the player. | ||
| Line 631: | Line 600: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:repairable</code> | | <code>minecraft:repairable</code> | ||
| Items that can be combined with this item in an anvil to repair it. | | Items that can be combined with this item in an anvil to repair it. | ||
| Line 645: | Line 613: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:glider</code> | | <code>minecraft:glider</code> | ||
| Makes the item function like elytra. | | Makes the item function like elytra. | ||
| ''no fields'' | | ''no fields'' | ||
|- | |- | ||
| <code>minecraft:tooltip_style</code> | | <code>minecraft:tooltip_style</code> | ||
| Custom textures for the item tooltip. | | Custom textures for the item tooltip. | ||
| Line 664: | Line 630: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:death_protection</code> | | <code>minecraft:death_protection</code> | ||
| Makes the item function like a totem of undying. | | Makes the item function like a totem of undying. | ||
| Line 678: | Line 643: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:blocks_attacks</code> | | <code>minecraft:blocks_attacks</code> | ||
| Makes the item act like a shield. | | Makes the item act like a shield. | ||
| Line 738: | Line 702: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:stored_enchantments</code> | | <code>minecraft:stored_enchantments</code> | ||
| The enchantments stored in this enchanted book. | | The enchantments stored in this enchanted book. | ||
| Line 758: | Line 721: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:dyed_color</code> | | <code>minecraft:dyed_color</code> | ||
| Color of dyed leather armor. | | Color of dyed leather armor. | ||
| Line 772: | Line 734: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:map_color</code> | | <code>minecraft:map_color</code> | ||
| Color of the markings on the map item model. | | Color of the markings on the map item model. | ||
| Line 786: | Line 747: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:map_id</code> | | <code>minecraft:map_id</code> | ||
| The ID of the map. | | The ID of the map. | ||
| Line 800: | Line 760: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:map_decorations</code> | | <code>minecraft:map_decorations</code> | ||
| Icons present on a map. | | Icons present on a map. | ||
| Line 814: | Line 773: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:map_post_processing</code> | | <code>minecraft:map_post_processing</code> | ||
| Used internally by the client when expanding or locking a map. Display extra information on the item's tooltip when the component is present. | | Used internally by the client when expanding or locking a map. Display extra information on the item's tooltip when the component is present. | ||
| Line 830: | Line 788: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:charged_projectiles</code> | | <code>minecraft:charged_projectiles</code> | ||
| Projectiles loaded into a charged crossbow. | | Projectiles loaded into a charged crossbow. | ||
| Line 844: | Line 801: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:bundle_contents</code> | | <code>minecraft:bundle_contents</code> | ||
| Contents of a bundle. | | Contents of a bundle. | ||
| Line 858: | Line 814: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:potion_contents</code> | | <code>minecraft:potion_contents</code> | ||
| Visual and effects of a potion item. | | Visual and effects of a potion item. | ||
| Line 885: | Line 840: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:potion_duration_scale</code> | | <code>minecraft:potion_duration_scale</code> | ||
| A duration multiplier for items that also have the <code>minecraft:potion_contents</code> component. | | A duration multiplier for items that also have the <code>minecraft:potion_contents</code> component. | ||
| Line 897: | Line 851: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:suspicious_stew_effects</code> | | <code>minecraft:suspicious_stew_effects</code> | ||
| Effects granted by a suspicious stew. | | Effects granted by a suspicious stew. | ||
| Line 917: | Line 870: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:writable_book_content</code> | | <code>minecraft:writable_book_content</code> | ||
| Content of a writable book. | | Content of a writable book. | ||
| Line 938: | Line 890: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:written_book_content</code> | | <code>minecraft:written_book_content</code> | ||
| Content of a written and signed book. | | Content of a written and signed book. | ||
| Line 978: | Line 929: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:trim</code> | | <code>minecraft:trim</code> | ||
| Armor's trim pattern and color | | Armor's trim pattern and color | ||
| Line 996: | Line 946: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:debug_stick_state</code> | | <code>minecraft:debug_stick_state</code> | ||
| State of the debug stick | | State of the debug stick | ||
| Line 1,010: | Line 959: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:entity_data</code> | | <code>minecraft:entity_data</code> | ||
| Data for the entity to be created from this item. | | Data for the entity to be created from this item. | ||
| Line 1,028: | Line 976: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:bucket_entity_data</code> | | <code>minecraft:bucket_entity_data</code> | ||
| Data of the entity contained in this bucket. | | Data of the entity contained in this bucket. | ||
| Line 1,042: | Line 989: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:block_entity_data</code> | | <code>minecraft:block_entity_data</code> | ||
| Data of the block entity to be created from this item. | | Data of the block entity to be created from this item. | ||
| Line 1,060: | Line 1,006: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:instrument</code> | | <code>minecraft:instrument</code> | ||
| The sound played when using a goat horn. | | The sound played when using a goat horn. | ||
| Line 1,074: | Line 1,019: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:provides_trim_material</code> | | <code>minecraft:provides_trim_material</code> | ||
| Used to make an item into a valid armor trim material. | | Used to make an item into a valid armor trim material. | ||
| Line 1,105: | Line 1,049: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:ominous_bottle_amplifier</code> | | <code>minecraft:ominous_bottle_amplifier</code> | ||
| Amplifier for the effect of an ominous bottle. | | Amplifier for the effect of an ominous bottle. | ||
| Line 1,119: | Line 1,062: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:jukebox_playable</code> | | <code>minecraft:jukebox_playable</code> | ||
| The song this item will play when inserted into a jukebox.<br>{{warning|The Notchian client assumes that the server will always represent the jukebox song either by name, or reference an entry on its respective registry. Trying to directly specify a jukebox song (when <code>Jukebox Song Type</code> is 0) will cause the client to fail to parse it and subsequently disconnect, which is likely an unintended bug.}} | | The song this item will play when inserted into a jukebox.<br>{{warning|The Notchian client assumes that the server will always represent the jukebox song either by name, or reference an entry on its respective registry. Trying to directly specify a jukebox song (when <code>Jukebox Song Type</code> is 0) will cause the client to fail to parse it and subsequently disconnect, which is likely an unintended bug.}} | ||
| Line 1,150: | Line 1,092: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:provides_banner_patterns</code> | | <code>minecraft:provides_banner_patterns</code> | ||
| Used to make an item into a valid banner pattern material. | | Used to make an item into a valid banner pattern material. | ||
| Line 1,164: | Line 1,105: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:recipes</code> | | <code>minecraft:recipes</code> | ||
| The recipes this knowledge book unlocks. | | The recipes this knowledge book unlocks. | ||
| Line 1,178: | Line 1,118: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:lodestone_tracker</code> | | <code>minecraft:lodestone_tracker</code> | ||
| The lodestone this compass points to. | | The lodestone this compass points to. | ||
| Line 1,204: | Line 1,143: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:firework_explosion</code> | | <code>minecraft:firework_explosion</code> | ||
| Properties of a firework star. | | Properties of a firework star. | ||
| Line 1,218: | Line 1,156: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:fireworks</code> | | <code>minecraft:fireworks</code> | ||
| Properties of a firework. | | Properties of a firework. | ||
| Line 1,236: | Line 1,173: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:profile</code> | | <code>minecraft:profile</code> | ||
| Game Profile of a player's head. | | Game Profile of a player's head. | ||
| Line 1,250: | Line 1,186: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:note_block_sound</code> | | <code>minecraft:note_block_sound</code> | ||
| Sound played by a note block when this player's head is placed on top of it. | | Sound played by a note block when this player's head is placed on top of it. | ||
| Line 1,264: | Line 1,199: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:banner_patterns</code> | | <code>minecraft:banner_patterns</code> | ||
| Patterns of a banner or banner applied to a shield. | | Patterns of a banner or banner applied to a shield. | ||
| Line 1,284: | Line 1,218: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:base_color</code> | | <code>minecraft:base_color</code> | ||
| Base color of the banner applied to a shield. | | Base color of the banner applied to a shield. | ||
| Line 1,298: | Line 1,231: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:pot_decorations</code> | | <code>minecraft:pot_decorations</code> | ||
| Decorations on the four sides of a pot. | | Decorations on the four sides of a pot. | ||
| Line 1,312: | Line 1,244: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:container</code> | | <code>minecraft:container</code> | ||
| Items inside a container of any type. | | Items inside a container of any type. | ||
| Line 1,326: | Line 1,257: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:block_state</code> | | <code>minecraft:block_state</code> | ||
| State of a block. | | State of a block. | ||
| Line 1,346: | Line 1,276: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:bees</code> | | <code>minecraft:bees</code> | ||
| Bees inside a hive. | | Bees inside a hive. | ||
| Line 1,374: | Line 1,303: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:lock</code> | | <code>minecraft:lock</code> | ||
| Name of the necessary key to open this container. | | Name of the necessary key to open this container. | ||
| Line 1,388: | Line 1,316: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:container_loot</code> | | <code>minecraft:container_loot</code> | ||
| Loot table for an unopened container. | | Loot table for an unopened container. | ||
| Line 1,402: | Line 1,329: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:break_sound</code> | | <code>minecraft:break_sound</code> | ||
| Changes the sound that plays when the item breaks. | | Changes the sound that plays when the item breaks. | ||
| Line 1,416: | Line 1,342: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:villager/variant</code> | | <code>minecraft:villager/variant</code> | ||
| The biome variant of a villager. | | The biome variant of a villager. | ||
| Line 1,430: | Line 1,355: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:wolf/variant</code> | | <code>minecraft:wolf/variant</code> | ||
| The variant of a wolf. | | The variant of a wolf. | ||
| Line 1,444: | Line 1,368: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:wolf/sound_variant</code> | | <code>minecraft:wolf/sound_variant</code> | ||
| The type of sounds that a wolf makes. | | The type of sounds that a wolf makes. | ||
| Line 1,458: | Line 1,381: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:wolf/collar</code> | | <code>minecraft:wolf/collar</code> | ||
| The dye color of the wolf's collar. | | The dye color of the wolf's collar. | ||
| Line 1,470: | Line 1,392: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:fox/variant</code> | | <code>minecraft:fox/variant</code> | ||
| The variant of a fox. | | The variant of a fox. | ||
| Line 1,484: | Line 1,405: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:salmon/size</code> | | <code>minecraft:salmon/size</code> | ||
| The size of a salmon. | | The size of a salmon. | ||
| Line 1,498: | Line 1,418: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:parrot/variant</code> | | <code>minecraft:parrot/variant</code> | ||
| The variant of a parrot. | | The variant of a parrot. | ||
| Line 1,512: | Line 1,431: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:tropical_fish/pattern</code> | | <code>minecraft:tropical_fish/pattern</code> | ||
| The pattern of a tropical fish. | | The pattern of a tropical fish. | ||
| Line 1,526: | Line 1,444: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:tropical_fish/base_color</code> | | <code>minecraft:tropical_fish/base_color</code> | ||
| The base color of a tropical fish. | | The base color of a tropical fish. | ||
| Line 1,538: | Line 1,455: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:tropical_fish/pattern_color</code> | | <code>minecraft:tropical_fish/pattern_color</code> | ||
| The pattern color of a tropical fish. | | The pattern color of a tropical fish. | ||
| Line 1,550: | Line 1,466: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:mooshroom/variant</code> | | <code>minecraft:mooshroom/variant</code> | ||
| The variant of a mooshroom. | | The variant of a mooshroom. | ||
| Line 1,564: | Line 1,479: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:rabbit/variant</code> | | <code>minecraft:rabbit/variant</code> | ||
| The variant of a rabbit. | | The variant of a rabbit. | ||
| Line 1,578: | Line 1,492: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:pig/variant</code> | | <code>minecraft:pig/variant</code> | ||
| The variant of a pig. | | The variant of a pig. | ||
| Line 1,592: | Line 1,505: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:cow/variant</code> | | <code>minecraft:cow/variant</code> | ||
| The variant of a cow. | | The variant of a cow. | ||
| Line 1,606: | Line 1,518: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:chicken/variant</code> | | <code>minecraft:chicken/variant</code> | ||
| The variant of a chicken. | | The variant of a chicken. | ||
| Line 1,637: | Line 1,548: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:frog/variant</code> | | <code>minecraft:frog/variant</code> | ||
| The variant of a frog. | | The variant of a frog. | ||
| Line 1,651: | Line 1,561: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:horse/variant</code> | | <code>minecraft:horse/variant</code> | ||
| The variant of a horse. | | The variant of a horse. | ||
| Line 1,665: | Line 1,574: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:painting/variant</code> | | <code>minecraft:painting/variant</code> | ||
| The variant of a painting. | | The variant of a painting. | ||
| Line 1,677: | Line 1,585: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:llama/variant</code> | | <code>minecraft:llama/variant</code> | ||
| The variant of a llama. | | The variant of a llama. | ||
| Line 1,691: | Line 1,598: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:axolotl/variant</code> | | <code>minecraft:axolotl/variant</code> | ||
| The variant of an axolotl. | | The variant of an axolotl. | ||
| Line 1,705: | Line 1,611: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:cat/variant</code> | | <code>minecraft:cat/variant</code> | ||
| The variant of a cat. | | The variant of a cat. | ||
| Line 1,719: | Line 1,624: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:cat/collar</code> | | <code>minecraft:cat/collar</code> | ||
| The dye color of the cat's collar. | | The dye color of the cat's collar. | ||
| Line 1,731: | Line 1,635: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:sheep/color</code> | | <code>minecraft:sheep/color</code> | ||
| The color of a sheep. | | The color of a sheep. | ||
| Line 1,743: | Line 1,646: | ||
|} | |} | ||
|- | |- | ||
| <code>minecraft:shulker/color</code> | | <code>minecraft:shulker/color</code> | ||
| The color of a shulker. | | The color of a shulker. | ||
Revision as of 11:11, 6 July 2026
The Slot data structure defines how an item is represented when inside an inventory window of any kind, such as a chest or furnace.
This page presents the new Slot data structure, using structured components. You can find the documentation of the old structure, that utilizes raw NBT data, here.
Format
| Name | Type | Meaning | |||
|---|---|---|---|---|---|
| Item Count | Template:Type | The item count. Every following field is only present if this value is greater than zero. | |||
| Item ID | Template:Type Template:Type | ID in the minecraft:item registry. Item IDs are distinct from block IDs; see Data Generators for more information.
| |||
| Number of components to add | Template:Type Template:Type | Number of elements present in the first data component array | |||
| Number of components to remove | Template:Type Template:Type | Number of elements present in the second data component array. This serve as a way to remove the default component values that are present on some items. | |||
| Components to add | Component type | Template:Type Template:Type | Template:Type Template:Type | ID in the minecraft:data_component_type registry, indicating the type of the component and the format of data to follow.
| |
| Component data | Varies | The component-dependent data. See structured components for more detail. | |||
| Components to remove | Component type | Template:Type Template:Type | Template:Type Template:Type | ID in the minecraft:data_component_type registry, indicating the type of the component.
| |
Hashed format
Similar to the usual slot format, but with the notable difference that data component values are encoded as CRC32C (note: CRC32C is not the same thing as CRC32) checksums. The way the checksum is generated is currently undocumented. It's currently only used in the click container packet.
| Name | Type | Meaning | |||
|---|---|---|---|---|---|
| Has Item | Template:Type | Every following field is only present if this value is true. | |||
| Item ID | Template:Type Template:Type | ID in the minecraft:item registry. Item IDs are distinct from block IDs; see Data Generators for more information.
| |||
| Item Count | Template:Type Template:Type | The item count. | |||
| Components to add | Component type | Template:Type Template:Type | Template:Type Template:Type | ID in the minecraft:data_component_type registry, indicating the type of the component.
| |
| Component data hash | Template:Type | A CRC32C (note: CRC32C is not the same thing as CRC32) checksum of the component data. Currently undocumented. | |||
| Components to remove | Component type | Template:Type Template:Type | Template:Type Template:Type | ID in the minecraft:data_component_type registry, indicating the type of the component.
| |
Structured components
The complete list of available components is described below.
For a more in-depth description, and information on how the items below are encoded with the NBT format, see Minecraft:Data component format.
| Name | Description | Data | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
minecraft:custom_data
|
Customizable data that doesn't fit any specific component. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:max_stack_size
|
Maximum stack size for the item. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:max_damage
|
The maximum damage the item can take before breaking. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:damage
|
The current damage of the item. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:unbreakable
|
Marks the item as unbreakable. | no fields | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:custom_name
|
Item's custom name. Normally shown in italic, and changeable at an anvil. |
As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:item_name
|
Override for the item's default name. Shown when the item has no custom name. |
As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:item_model
|
Item's model. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:lore
|
Item's lore. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:rarity
|
Item's rarity. This affects the default color of the item's name. |
As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:enchantments
|
The enchantments of the item. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:can_place_on
|
List of blocks this block can be placed on when in adventure mode. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:can_break
|
List of blocks this item can break when in adventure mode. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:attribute_modifiers
|
The attribute modifiers of the item. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:custom_model_data
|
Value for the item predicate when using custom item models. More info can be found here. |
As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:tooltip_display
|
Allows you to hide all or parts of the item tooltip. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:repair_cost
|
Accumulated anvil usage cost. The client displays "Too Expensive" if the value is greater than 40 and the player is not in creative mode (more specifically, if they don't have the insta-build flag enabled). This behavior can be overridden by setting the level with the Set Container Property packet. |
As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:creative_slot_lock
|
Marks the item as non-interactive on the creative inventory (the first 5 rows of items). This is used internally by the client on the paper icon in the saved hot-bars tab. |
no fields | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:enchantment_glint_override
|
Overrides the item glint resulted from enchantments | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:intangible_projectile
|
Marks the projectile as intangible (cannot be picked-up). | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:food
|
Makes the item restore the player's hunger bar when consumed. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:consumable
|
Makes the item consumable. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:use_remainder
|
This specifies the item produced after using the current item. In the Notchian server, this is used for stews, which turn into bowls. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:use_cooldown
|
Cooldown to apply on use of the item. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:damage_resistant
|
Marks this item as damage resistant. The client won't render the item as being on-fire if this component is present. |
As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:tool
|
Alters the speed at which this item breaks certain blocks | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:weapon
|
Item treated as a weapon | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:enchantable
|
Allows the item to be enchanted by an enchanting table. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:equippable
|
Allows the item to be equipped by the player. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:repairable
|
Items that can be combined with this item in an anvil to repair it. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:glider
|
Makes the item function like elytra. | no fields | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:tooltip_style
|
Custom textures for the item tooltip. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:death_protection
|
Makes the item function like a totem of undying. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:blocks_attacks
|
Makes the item act like a shield. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:stored_enchantments
|
The enchantments stored in this enchanted book. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:dyed_color
|
Color of dyed leather armor. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:map_color
|
Color of the markings on the map item model. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:map_id
|
The ID of the map. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:map_decorations
|
Icons present on a map. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:map_post_processing
|
Used internally by the client when expanding or locking a map. Display extra information on the item's tooltip when the component is present. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:charged_projectiles
|
Projectiles loaded into a charged crossbow. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:bundle_contents
|
Contents of a bundle. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:potion_contents
|
Visual and effects of a potion item. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:potion_duration_scale
|
A duration multiplier for items that also have the minecraft:potion_contents component.
|
As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:suspicious_stew_effects
|
Effects granted by a suspicious stew. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:writable_book_content
|
Content of a writable book. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:written_book_content
|
Content of a written and signed book. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:trim
|
Armor's trim pattern and color | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:debug_stick_state
|
State of the debug stick | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:entity_data
|
Data for the entity to be created from this item. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:bucket_entity_data
|
Data of the entity contained in this bucket. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:block_entity_data
|
Data of the block entity to be created from this item. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:instrument
|
The sound played when using a goat horn. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:provides_trim_material
|
Used to make an item into a valid armor trim material. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:ominous_bottle_amplifier
|
Amplifier for the effect of an ominous bottle. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:jukebox_playable
|
The song this item will play when inserted into a jukebox. Template:Warning |
As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:provides_banner_patterns
|
Used to make an item into a valid banner pattern material. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:recipes
|
The recipes this knowledge book unlocks. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:lodestone_tracker
|
The lodestone this compass points to. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:firework_explosion
|
Properties of a firework star. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:fireworks
|
Properties of a firework. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:profile
|
Game Profile of a player's head. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:note_block_sound
|
Sound played by a note block when this player's head is placed on top of it. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:banner_patterns
|
Patterns of a banner or banner applied to a shield. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:base_color
|
Base color of the banner applied to a shield. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:pot_decorations
|
Decorations on the four sides of a pot. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:container
|
Items inside a container of any type. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:block_state
|
State of a block. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:bees
|
Bees inside a hive. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:lock
|
Name of the necessary key to open this container. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:container_loot
|
Loot table for an unopened container. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:break_sound
|
Changes the sound that plays when the item breaks. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:villager/variant
|
The biome variant of a villager. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:wolf/variant
|
The variant of a wolf. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:wolf/sound_variant
|
The type of sounds that a wolf makes. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:wolf/collar
|
The dye color of the wolf's collar. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:fox/variant
|
The variant of a fox. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:salmon/size
|
The size of a salmon. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:parrot/variant
|
The variant of a parrot. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:tropical_fish/pattern
|
The pattern of a tropical fish. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:tropical_fish/base_color
|
The base color of a tropical fish. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:tropical_fish/pattern_color
|
The pattern color of a tropical fish. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:mooshroom/variant
|
The variant of a mooshroom. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:rabbit/variant
|
The variant of a rabbit. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:pig/variant
|
The variant of a pig. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:cow/variant
|
The variant of a cow. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:chicken/variant
|
The variant of a chicken. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:frog/variant
|
The variant of a frog. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:horse/variant
|
The variant of a horse. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:painting/variant
|
The variant of a painting. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:llama/variant
|
The variant of a llama. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:axolotl/variant
|
The variant of an axolotl. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:cat/variant
|
The variant of a cat. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:cat/collar
|
The dye color of the cat's collar. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:sheep/color
|
The color of a sheep. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minecraft:shulker/color
|
The color of a shulker. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Other types
Common types used in multiple components are described below.
Block Predicate
Describes a predicate used when block filtering is necessary. It can be parameterized to account for any combination of the type of block, the values of specific block state properties, or block entities' NBT data or data components.
| Name | Type | Description |
|---|---|---|
| Blocks | Template:Type Template:Type | IDs in the minecraft:block registry. Present only when tied to specific types of blocks.
|
| Properties | Template:Type Template:Type of Property | See Property structure below. Present only when tied to specific properties of blocks. |
| NBT | Template:Type Template:Type | |
| Data Components | Template:Type of Exact Data Component Matcher | A list of data components which must exactly match the target block. |
| Partial Data Component Predicates | Template:Type of Partial Data Component Matcher | A list of predicates to match the block's data components. Max length = 64. |
Property
| Name | Type | Description |
|---|---|---|
| Name | Template:Type | Name of the block state property. |
| Is Exact Match | Template:Type | Whether this is an exact value match, as opposed to ranged. |
| Exact Value | Template:Type Template:Type | Value of the block state property. Only present in exact match mode. |
| Min Value | Template:Type Template:Type | Minimum value of the block state property range. Only present in ranged match mode. |
| Max Value | Template:Type Template:Type | Maximum value of the block state property range. Only present in ranged match mode. |
Exact Data Component Matcher
| Name | Type | Description |
|---|---|---|
| Type | Template:Type Template:Type | ID of the data component as listed in the table of data component types above. |
| Value | Structured Component | Value of the data component. |
Partial Data Component Matcher
| Name | Type | Description |
|---|---|---|
| Type | Template:Type Template:Type | Type of predicate. 0: damage, 1: enchantments, 2: stored_enchantments, 3: potion_contents, 4: custom_data, 5: container, 6: bundle_contents, 7: firework_explosion, 8: fireworks, 9: writable_book_content, 10: written_book_content, 11: attribute_modifiers, 12: trim, 13: jukebox_playable. |
| Predicate | Template:Type Compound | Minecraft:Data component predicate encoded as an NBT compound tag. |
Dye Color
A color from one of the 16 dye types.
| Name | Type | Description |
|---|---|---|
| Color | Template:Type Template:Type | Can be one of the following:
|
Firework Explosion
Represents a firework explosion, consisting of a shape, colors, and extra details.
| Name | Type | Description |
|---|---|---|
| Shape | Template:Type Template:Type | Can be one of the following:
|
| Colors | Template:Type of Template:Type | The RGB components of the color, encoded as an integer. |
| Fade Colors | Template:Type of Template:Type | The RGB components of the color, encoded as an integer. |
| Has Trail | Template:Type | |
| Has Twinkle | Template:Type |
Potion Effect
Describes all the aspects of a potion effect.
| Name | Type | Description |
|---|---|---|
| Type ID | Template:Type Template:Type | The ID of the effect in the minecraft:mob_effect registry.
|
| Details | Detail | See Detail structure below. |
The Detail structure is defined as follows:
| Name | Type | Description |
|---|---|---|
| Amplifier | Template:Type | |
| Duration | Template:Type | -1 for infinite. |
| Ambient | Template:Type | Produces more translucent particle effects if true. |
| Show Particles | Template:Type | Completely hides effect particles if false. |
| Show Icon | Template:Type | Shows the potion icon in the inventory screen if true. |
| Hidden Effect | Template:Type Detail | Used to store the state of the previous potion effect when a stronger one is applied. This guarantees that the weaker one will persist, in case it lasts longer. |
Trim Material
| Name | Type | Description | ||
|---|---|---|---|---|
| Suffix | Template:Type | |||
| Overrides | Armor Material Type | Template:Type | Template:Type | |
| Overriden Asset Name | Template:Type | |||
| Description | Template:Type | |||
Trim Pattern
| Name | Type | Description |
|---|---|---|
| Asset Name | Template:Type | |
| Template Item | Template:Type | |
| Description | Template:Type | |
| Decal | Template:Type |
Consume Effect
| Name | Type | Description |
|---|---|---|
| Type | Template:Type | The ID of the effect in the minecraft:consume_effect_type registry.
|
| Data | Varies | See below |
| Type | Name | Data | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | minecraft:apply_effects
|
| |||||||||
| 1 | minecraft:remove_effects
|
| |||||||||
| 2 | minecraft:clear_all_effects
|
no fields | |||||||||
| 3 | minecraft:teleport_randomly
|
| |||||||||
| 4 | minecraft:play_sound
|
|
Instrument
| Name | Type | Description |
|---|---|---|
| Sound Event | Template:Type Template:Type | The sound to be played. |
| Use Duration | Template:Type | The time it takes to use the instrument. |
| Range | Template:Type | The sound range of the instrument. |
| Description | Template:Type | Description shown in the item tooltip. |
Jukebox Song
| Name | Type | Description |
|---|---|---|
| Sound Event | Template:Type Template:Type | The sound to be played. |
| Description | Template:Type | The description shown in the item lore. |
| Duration | Template:Type | The duration the songs should play for, in seconds. |
| Output | Template:Type | The output strength given by a comparator. Between 0 and 15. |
Banner Pattern
| Name | Type | Description |
|---|---|---|
| Asset ID | Template:Type | Identifier of the asset. |
| Translation Key | Template:Type |