Difference between revisions of "Slot Data"
(Components FTW) |
m (Fix incorrect type link.) |
||
(11 intermediate revisions by 6 users not shown) | |||
Line 4: | Line 4: | ||
= Format = | = Format = | ||
− | |||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
Line 48: | Line 46: | ||
== 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, check [https://minecraft.wiki/w/Data_component_format here]. | For a more in-depth description, and information on how the items below are encoded with the NBT format, check [https://minecraft.wiki/w/Data_component_format here]. | ||
Line 337: | Line 335: | ||
| 14 | | 14 | ||
| <code>minecraft:hide_additional_tooltip</code> | | <code>minecraft:hide_additional_tooltip</code> | ||
− | | | + | | Hides the special item's tooltip of crossbow ("Projectile:"), banner pattern layers, goat horn instrument and others. |
| None. | | None. | ||
|- | |- | ||
Line 380: | Line 378: | ||
| 19 | | 19 | ||
| <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). |
− | | | + | | None. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| 20 | | 20 | ||
Line 405: | Line 394: | ||
| Non-negative | | Non-negative | ||
|- | |- | ||
− | | colspan="2"| Saturation | + | | colspan="2"| Saturation Modifier |
− | | colspan="2"| {{Type| | + | | colspan="2"| {{Type|Float}} |
− | | | + | | How much saturation will be given after consuming the item. |
|- | |- | ||
| colspan="2"| Can Always Eat | | colspan="2"| Can Always Eat | ||
Line 416: | Line 405: | ||
| colspan="2"| {{Type|Float}} | | colspan="2"| {{Type|Float}} | ||
| How long it takes to consume the item. | | How long it takes to consume the item. | ||
+ | |- | ||
+ | | colspan="2"| Using converts to | ||
+ | | colspan="2"| {{Type|Slot}} | ||
+ | | This specifies the item produced after consuming the current item. In the Notchian server, this is used for stews, which turn into bowls. Set this to Air if the item should be consumed normally without leaving any other item after. | ||
|- | |- | ||
| colspan="2"| Number of effects | | colspan="2"| Number of effects | ||
Line 453: | Line 446: | ||
| Blocks | | Blocks | ||
| rowspan="5"| {{Type|Array}} | | rowspan="5"| {{Type|Array}} | ||
− | | | + | | {{Type|ID Set}} |
− | | The | + | | The blocks this rule applies to (IDs in the <code>minecraft:block</code> registry). |
|- | |- | ||
| Has Speed | | Has Speed | ||
Line 629: | Line 622: | ||
! Type | ! Type | ||
! Description | ! Description | ||
+ | |- | ||
+ | | Has Potion ID | ||
+ | | {{Type|Boolean}} | ||
+ | | Whether this potion has an ID in the potion registry. If true, it has the default effects associated with the potion type. | ||
|- | |- | ||
| Potion ID | | Potion ID | ||
− | | {{Type|VarInt}} | + | | {{Type|Optional}} {{Type|VarInt}} |
− | | The ID of the potion type in the potion registry. | + | | The ID of the potion type in the potion registry. Only present if Has Potion ID is true. |
|- | |- | ||
| Has Custom Color | | Has Custom Color | ||
Line 639: | Line 636: | ||
|- | |- | ||
| Custom Color | | Custom Color | ||
− | | {{Type|Int}} | + | | {{Type|Optional}} {{Type|Int}} |
− | | The RGB components of the color, encoded as an integer. | + | | The RGB components of the color, encoded as an integer. Only present if Has Custom Color is true. |
|- | |- | ||
| Number Of Custom Effects | | Number Of Custom Effects | ||
Line 760: | Line 757: | ||
| As follows: | | As follows: | ||
{| class="wikitable" | {| class="wikitable" | ||
− | ! | + | ! Name |
− | ! | + | ! Type |
! Description | ! Description | ||
|- | |- | ||
− | + | | Trim Material | |
− | + | | {{Type|ID or}} [[#Trim Material|Trim Material]] | |
− | | | + | | ID in the <code>minecraft:trim_material</code> registry, or an inline definition. |
− | |||
− | |||
|- | |- | ||
− | | | + | | Trim Pattern |
− | | | + | | {{Type|ID or}} [[#Trim Pattern|Trim Pattern]] |
− | + | | ID in the <code>minecraft:trim_pattern</code> registry, or an inline definition. | |
|- | |- | ||
− | + | | Show In Tooltip | |
− | + | | {{Type|Boolean}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
| Whether the trim information should be shown on the item's tooltip. | | Whether the trim information should be shown on the item's tooltip. | ||
|} | |} | ||
Line 892: | Line 839: | ||
! Description | ! Description | ||
|- | |- | ||
− | | Instrument | + | | Instrument |
− | | {{Type| | + | | {{Type|Id or}} [[#Instrument|Instrument]] |
− | | | + | | ID in the <code>minecraft:instrument</code> registry, or an inline definition. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
|- | |- | ||
Line 941: | Line 859: | ||
|- | |- | ||
| 42 | | 42 | ||
+ | | <code>minecraft:jukebox_playable</code> | ||
+ | | The song this item will play when inserted into a jukebox.<br>{{Warning2|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.}} | ||
+ | | As follows: | ||
+ | {| class="wikitable" | ||
+ | ! Name | ||
+ | ! Type | ||
+ | ! Description | ||
+ | |- | ||
+ | | Direct Mode | ||
+ | | {{Type|Boolean}} | ||
+ | | Whether the jukebox song is specified directly, or just referenced by name. | ||
+ | |- | ||
+ | | Jukebox Song Name | ||
+ | | {{Type|Optional}} {{Type|Identifier}} | ||
+ | | The name of the jukebox song in its respective registry. Only present if Direct Mode is false. | ||
+ | |- | ||
+ | | Jukebox Song | ||
+ | | {{Type|Optional}} {{Type|ID or}} [[#Jukebox Song|Jukebox Song]] | ||
+ | | ID in the <code>minecraft:jukebox_song</code> registry. Only present if Direct Mode is true. | ||
+ | |- | ||
+ | | Show In Tooltip | ||
+ | | {{Type|Boolean}} | ||
+ | | Whether the song should be shown on the item's tooltip. | ||
+ | |} | ||
+ | |- | ||
+ | | 43 | ||
| <code>minecraft:recipes</code> | | <code>minecraft:recipes</code> | ||
| The recipes this knowledge book unlocks. | | The recipes this knowledge book unlocks. | ||
Line 954: | Line 898: | ||
|} | |} | ||
|- | |- | ||
− | | | + | | 44 |
| <code>minecraft:lodestone_tracker</code> | | <code>minecraft:lodestone_tracker</code> | ||
| The lodestone this compass points to. | | The lodestone this compass points to. | ||
Line 980: | Line 924: | ||
|} | |} | ||
|- | |- | ||
− | | | + | | 45 |
| <code>minecraft:firework_explosion</code> | | <code>minecraft:firework_explosion</code> | ||
| Properties of a firework star. | | Properties of a firework star. | ||
Line 994: | Line 938: | ||
|} | |} | ||
|- | |- | ||
− | | | + | | 46 |
| <code>minecraft:fireworks</code> | | <code>minecraft:fireworks</code> | ||
| Properties of a firework. | | Properties of a firework. | ||
Line 1,016: | Line 960: | ||
|} | |} | ||
|- | |- | ||
− | | | + | | 47 |
| <code>minecraft:profile</code> | | <code>minecraft:profile</code> | ||
| Game Profile of a player's head. | | Game Profile of a player's head. | ||
Line 1,064: | Line 1,008: | ||
|} | |} | ||
|- | |- | ||
− | | | + | | 48 |
| <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,078: | Line 1,022: | ||
|} | |} | ||
|- | |- | ||
− | | | + | | 49 |
| <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,112: | Line 1,056: | ||
|} | |} | ||
|- | |- | ||
− | | | + | | 50 |
| <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,126: | Line 1,070: | ||
|} | |} | ||
|- | |- | ||
− | | | + | | 51 |
| <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,144: | Line 1,088: | ||
|} | |} | ||
|- | |- | ||
− | | | + | | 52 |
| <code>minecraft:container</code> | | <code>minecraft:container</code> | ||
| Items inside a container of any type. | | Items inside a container of any type. | ||
Line 1,162: | Line 1,106: | ||
|} | |} | ||
|- | |- | ||
− | | | + | | 53 |
| <code>minecraft:block_state</code> | | <code>minecraft:block_state</code> | ||
| State of a block. | | State of a block. | ||
Line 1,186: | Line 1,130: | ||
|} | |} | ||
|- | |- | ||
− | | | + | | 54 |
| <code>minecraft:bees</code> | | <code>minecraft:bees</code> | ||
| Bees inside a hive. | | Bees inside a hive. | ||
Line 1,214: | Line 1,158: | ||
|} | |} | ||
|- | |- | ||
− | | | + | | 55 |
| <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,228: | Line 1,172: | ||
|} | |} | ||
|- | |- | ||
− | | | + | | 56 |
| <code>minecraft:container_loot</code> | | <code>minecraft:container_loot</code> | ||
| Loot table for an unopened container. | | Loot table for an unopened container. | ||
Line 1,261: | Line 1,205: | ||
|- | |- | ||
| Blocks | | Blocks | ||
− | | {{Type|Optional}} | + | | {{Type|Optional}} {{Type|ID Set}} |
− | | | + | | IDs in the <code>minecraft:block</code> registry. Only present if Has Blocks is true. |
|- | |- | ||
| Has Properties | | Has Properties | ||
Line 1,311: | Line 1,255: | ||
| {{Type|Optional}} {{Type|String}} | | {{Type|Optional}} {{Type|String}} | ||
| Maximum value of the block state property range. Only present in ranged match mode. | | Maximum value of the block state property range. Only present in ranged match mode. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
Line 1,464: | Line 1,384: | ||
| Only present if Has Hidden Effect is true. | | Only present if Has Hidden Effect is true. | ||
|} | |} | ||
+ | |||
+ | === Trim Material === | ||
+ | |||
+ | {{See also|Registry_Data#Armor Trim Material}} | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! colspan="2"| Name | ||
+ | ! colspan="2"| Type | ||
+ | ! Description | ||
+ | |- | ||
+ | | colspan="2"| Asset Name | ||
+ | | colspan="2"| {{Type|String}} | ||
+ | | | ||
+ | |- | ||
+ | | colspan="2"| Ingredient | ||
+ | | colspan="2"| {{Type|VarInt}} | ||
+ | | | ||
+ | |- | ||
+ | | colspan="2"| Item Model Index | ||
+ | | colspan="2"| {{Type|Float}} | ||
+ | | | ||
+ | |- | ||
+ | | colspan="2"| Number of Overrides | ||
+ | | colspan="2"| {{Type|VarInt}} | ||
+ | | | ||
+ | |- | ||
+ | | rowspan="2"| Override | ||
+ | | Armor Material Type | ||
+ | | rowspan="2"| {{Type|Array}} | ||
+ | | {{Type|VarInt}} {{Type|Enum}} | ||
+ | | | ||
+ | |- | ||
+ | | Overriden Asset Name | ||
+ | | {{Type|String}} | ||
+ | | | ||
+ | |- | ||
+ | | colspan="2"| Description | ||
+ | | colspan="2"| {{Type|Text Component}} | ||
+ | |} | ||
+ | |||
+ | === Trim Pattern === | ||
+ | |||
+ | {{See also|Registry_Data#Armor Trim Pattern}} | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! Name | ||
+ | ! Type | ||
+ | ! Description | ||
+ | |- | ||
+ | | Asset Name | ||
+ | | {{Type|String}} | ||
+ | | | ||
+ | |- | ||
+ | | Template Item | ||
+ | | {{Type|VarInt}} | ||
+ | | | ||
+ | |- | ||
+ | | Description | ||
+ | | {{Type|Text Component}} | ||
+ | | | ||
+ | |- | ||
+ | | Decal | ||
+ | | {{Type|Boolean}} | ||
+ | | | ||
+ | |} | ||
+ | |||
+ | === Instrument === | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! Name | ||
+ | ! Type | ||
+ | ! Description | ||
+ | |- | ||
+ | | Sound Event | ||
+ | | {{Type|Id or}} {{Type|Sound Event}} | ||
+ | | The sound to be played. | ||
+ | |- | ||
+ | | Use duration | ||
+ | | {{Type|VarInt}} | ||
+ | | The maximum range of the sound. | ||
+ | |- | ||
+ | | Range | ||
+ | | {{Type|Float}} | ||
+ | | The range of the instrument. | ||
+ | |} | ||
+ | |||
+ | === Jukebox Song === | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! Name | ||
+ | ! Type | ||
+ | ! Description | ||
+ | |- | ||
+ | | Sound Event | ||
+ | | {{Type|Optional}} {{Type|Id or}} {{Type|Sound Event}} | ||
+ | | The sound to be played. | ||
+ | |- | ||
+ | | Description | ||
+ | | {{Type|Optional}} {{Type|Text Component}} | ||
+ | | The description shown in the item lore. | ||
+ | |- | ||
+ | | Duration | ||
+ | | {{Type|Optional}} {{Type|Float}} | ||
+ | | The duration the songs should play for, in seconds. | ||
+ | |- | ||
+ | | Output | ||
+ | | {{Type|Optional}} {{Type|VarInt}} | ||
+ | | The output strength given by a comparator. Between 0 and 15. | ||
+ | |- | ||
[[Category:Protocol Details]] | [[Category:Protocol Details]] | ||
[[Category:Minecraft Modern]] | [[Category:Minecraft Modern]] |
Latest revision as of 11:09, 21 November 2024
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.
Contents
Format
Name | Type | Meaning | |||
---|---|---|---|---|---|
Item Count | VarInt | The item count. Every following field is only present if this value is greater than zero. | |||
Item ID | Optional VarInt | The item ID. Item IDs are distinct from block IDs; see Data Generators for more information. | |||
Number of components to add | Optional VarInt | Number of elements present in the first data component array | |||
Number of components to remove | Optional VarInt | 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 | Optional Array | VarInt Enum | The type of component. See Structured components for more detail. | |
Component data | Varies | The component-dependent data. See Structured components for more detail. | |||
Components to remove | Component type | Optional Array | VarInt Enum | The type of component. See Structured components for more detail. |
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, check here.
Type | Name | Description | Data | |||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | minecraft:custom_data
|
Customizable data that doesn't fit any specific component. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
1 | minecraft:max_stack_size
|
Maximum stack size for the item. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
2 | minecraft:max_damage
|
The maximum damage the item can take before breaking. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
3 | minecraft:damage
|
The current damage of the item. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
4 | minecraft:unbreakable
|
Marks the item as unbrekable. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
5 | minecraft:custom_name
|
Item's custom name. Normally shown in italic, and changeable at an anvil. |
As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
6 | minecraft:item_name
|
Override for the item's default name. Shown when the item has no custom name. |
As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
7 | minecraft:lore
|
Item's lore. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
8 | minecraft:rarity
|
Item's rarity. This affects the default color of the item's name. |
As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
9 | minecraft:enchantments
|
The enchantments of the item. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
10 | minecraft:can_place_on
|
List of blocks this block can be placed on when in adventure mode. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
11 | minecraft:can_break
|
List of blocks this item can break when in adventure mode. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
12 | minecraft:attribute_modifiers
|
The attribute modifiers of the item. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
13 | minecraft:custom_model_data
|
Value for the item predicate when using custom item models. More info can be found here. |
As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
14 | minecraft:hide_additional_tooltip
|
Hides the special item's tooltip of crossbow ("Projectile:"), banner pattern layers, goat horn instrument and others. | None. | |||||||||||||||||||||||||||||||||||||||||||||||||||
15 | minecraft:hide_tooltip
|
Hides the item's tooltip altogether. | None. | |||||||||||||||||||||||||||||||||||||||||||||||||||
16 | 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:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
17 | 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. |
None. | |||||||||||||||||||||||||||||||||||||||||||||||||||
18 | minecraft:enchantment_glint_override
|
Overrides the item glint resulted from enchantments | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
19 | minecraft:intangible_projectile
|
Marks the projectile as intangible (cannot be picked-up). | None. | |||||||||||||||||||||||||||||||||||||||||||||||||||
20 | minecraft:food
|
Makes the item consumable. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
21 | minecraft:fire_resistant
|
Marks this item as fire resistant. The client won't render the item as being on-fire if this component is present. |
None. | |||||||||||||||||||||||||||||||||||||||||||||||||||
22 | minecraft:tool
|
Alters the speed at which this item breaks certain blocks | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
23 | minecraft:stored_enchantments
|
The enchantments stored in this enchanted book. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
24 | minecraft:dyed_color
|
Color of dyed leather armor. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
25 | minecraft:map_color
|
Color of the markings on the map item model. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
26 | minecraft:map_id
|
The ID of the map. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
27 | minecraft:map_decorations
|
Icons present on a map. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
28 | 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:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
29 | minecraft:charged_projectiles
|
Projectiles loaded into a charged crossbow. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
30 | minecraft:bundle_contents
|
Contents of a bundle. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
31 | minecraft:potion_contents
|
Visual and effects of a potion item. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
32 | minecraft:suspicious_stew_effects
|
Effects granted by a suspicious stew. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
33 | minecraft:writable_book_content
|
Content of a writable book. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
34 | minecraft:written_book_content
|
Content of a written and signed book. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
35 | minecraft:trim
|
Armor's trim pattern and color | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
36 | minecraft:debug_stick_state
|
State of the debug stick | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
37 | minecraft:entity_data
|
Data for the entity to be created from this item. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
38 | minecraft:bucket_entity_data
|
Data of the entity contained in this bucket. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
39 | minecraft:block_entity_data
|
Data of the block entity to be created from this item. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
40 | minecraft:instrument
|
The sound played when using a goat horn. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
41 | minecraft:ominous_bottle_amplifier
|
Amplifier for the effect of an ominous bottle. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
42 | minecraft:jukebox_playable
|
The song this item will play when inserted into a jukebox. 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 |
As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
43 | minecraft:recipes
|
The recipes this knowledge book unlocks. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
44 | minecraft:lodestone_tracker
|
The lodestone this compass points to. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
45 | minecraft:firework_explosion
|
Properties of a firework star. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
46 | minecraft:fireworks
|
Properties of a firework. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
47 | minecraft:profile
|
Game Profile of a player's head. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
48 | minecraft:note_block_sound
|
Sound played by a note block when this player's head is placed on top of it. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
49 | minecraft:banner_patterns
|
Patterns of a banner or banner applied to a shield. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
50 | minecraft:base_color
|
Base color of the banner applied to a shield. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
51 | minecraft:pot_decorations
|
Decorations on the four sides of a pot. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
52 | minecraft:container
|
Items inside a container of any type. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
53 | minecraft:block_state
|
State of a block. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
54 | minecraft:bees
|
Bees inside a hive. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
55 | minecraft:lock
|
Name of the necessary key to open this container. | As follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||
56 | minecraft:container_loot
|
Loot table for an unopened container. | 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 the type of block, the values of specific block state properties, NBT data related to block entities, or any combination of the three.
Name | Type | Description |
---|---|---|
Has Blocks | Boolean | Whether this predicate is tied to specific types of blocks. |
Blocks | Optional ID Set | IDs in the minecraft:block registry. Only present if Has Blocks is true.
|
Has Properties | Boolean | Whether this predicate is tied to specific properties of a block. |
Number of Properties | Optional VarInt | Number of elements in the following array. Only present if Has Properties is true. |
Properties | Optional Array of Property | See Property structure below. Only present if Has Properties is true. |
Has NBT | Boolean | Whether this predicate is tied to specific block entity data. |
NBT | Optional NBT | Only present is Has NBT is true. |
The Property structure is defined as follows:
Name | Type | Description |
---|---|---|
Name | String | Name of the block state property. |
Is Exact Match | Boolean | Whether this is an exact value match, as opposed to ranged. |
Exact Value | Optional String | Value of the block state property. Only present in exact match mode. |
Min Value | Optional String | Minimum value of the block state property range. Only present in ranged match mode. |
Max Value | Optional String | Maximum value of the block state property range. Only present in ranged match mode. |
Dye Color
A color from one of the 16 dye types.
Name | Type | Description |
---|---|---|
Color | VarInt Enum | Can be one of the following:
|
Firework Explosion
Represents a firework explosion, consisting of a shape, colors, and extra details.
Name | Type | Description |
---|---|---|
Shape | VarInt Enum | Can be one of the following:
|
Number Of Colors | VarInt | The number of elements in the following array. |
Colors | Array of Int | The RGB components of the color, encoded as an integer. |
Number Of Fade Colors | VarInt | The number of elements in the following array. |
Fade Colors | Array of Int | The RGB components of the color, encoded as an integer. |
Has Trail | Boolean | |
Has Twinkle | Boolean |
Potion Effect
Describes all the aspects of a potion effect.
Name | Type | Description |
---|---|---|
Type ID | VarInt Enum | The ID of the effect in the potion effect type registry. |
Details | Detail | See Detail structure below. |
The Detail structure is defined as follows:
Name | Type | Description | |||
---|---|---|---|---|---|
Amplifier | VarInt | ||||
Duration | VarInt | -1 for infinite. | |||
Ambient | Boolean | Produces more translucent particle effects if true. | |||
Show Particles | Boolean | Completely hides effect particles if false. | |||
Show Icon | Boolean | Shows the potion icon in the inventory screen if true. | |||
Has Hidden Effect | Boolean | 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.
| |||
Hidden Effect | Optional Detail | Only present if Has Hidden Effect is true. |
Trim Material
- See also: Registry_Data#Armor Trim Material
Name | Type | Description | ||
---|---|---|---|---|
Asset Name | String | |||
Ingredient | VarInt | |||
Item Model Index | Float | |||
Number of Overrides | VarInt | |||
Override | Armor Material Type | Array | VarInt Enum | |
Overriden Asset Name | String | |||
Description | Text Component |
Trim Pattern
- See also: Registry_Data#Armor Trim Pattern
Name | Type | Description |
---|---|---|
Asset Name | String | |
Template Item | VarInt | |
Description | Text Component | |
Decal | Boolean |
Instrument
Name | Type | Description |
---|---|---|
Sound Event | Id or Sound Event | The sound to be played. |
Use duration | VarInt | The maximum range of the sound. |
Range | Float | The range of the instrument. |
Jukebox Song
Name | Type | Description |
---|---|---|
Sound Event | Optional Id or Sound Event | The sound to be played. |
Description | Optional Text Component | The description shown in the item lore. |
Duration | Optional Float | The duration the songs should play for, in seconds. |
Output | Optional VarInt | The output strength given by a comparator. Between 0 and 15. |