Java Edition protocol/Slot data

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 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.


Hashed Format

Similar to the usual slot format, but with the notable difference that data component values are encoded 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 Boolean Every following field is only present if this value is true.
Item ID Optional VarInt The item ID. Item IDs are distinct from block IDs; see Data Generators for more information.
Item Count Optional VarInt The item count.
Components to add Component type Optional Prefixed Array VarInt Enum The type of component. See Structured components for more detail.
Component data hash Int A CRC32 checksum of the component data. Currently undocumented.
Components to remove Component type Optional Prefixed 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:
Name Type Description
Data NBT Always a Compound Tag.
1 minecraft:max_stack_size Maximum stack size for the item. As follows:
Name Type Description
Max Stack Size VarInt Ranges from 1 to 99.
2 minecraft:max_damage The maximum damage the item can take before breaking. As follows:
Name Type Description
Max Damage VarInt
3 minecraft:damage The current damage of the item. As follows:
Name Type Description
Damage VarInt
4 minecraft:unbreakable Marks the item as unbreakable. no fields
5 minecraft:custom_name Item's custom name.
Normally shown in italic, and changeable at an anvil.
As follows:
Name Type Description
Name Text Component
6 minecraft:item_name Override for the item's default name.
Shown when the item has no custom name.
As follows:
Name Type Description
Name Text Component
7 minecraft:item_model Item's model. As follows:
Name Type Description
Model Identifier
8 minecraft:lore Item's lore. As follows:
Name Type Description
Lines Prefixed Array of Text Component
9 minecraft:rarity Item's rarity.
This affects the default color of the item's name.
As follows:
Name Type Description
Rarity VarInt Enum Can be one of the following:
  • 0 - Common (white)
  • 1 - Uncommon (yellow)
  • 2 - Rare (aqua)
  • 3 - Epic (pink)
10 minecraft:enchantments The enchantments of the item. As follows:
Name Type Description
Enchantment Type ID Prefixed Array VarInt Enum The ID of the enchantment in the enchantment registry.
Level VarInt The level of the enchantment.
11 minecraft:can_place_on List of blocks this block can be placed on when in adventure mode. As follows:
Name Type Description
Block Predicates Prefixed Array of Block Predicate See Block Predicate.
12 minecraft:can_break List of blocks this item can break when in adventure mode. As follows:
Name Type Description
Block Predicates Prefixed Array of Block Predicate See Block Predicate.
13 minecraft:attribute_modifiers The attribute modifiers of the item. As follows:
Name Type Description
Attribute Modifier Attribute ID Prefixed Array VarInt The attribute to be modified (ID in the minecraft:attribute registry).
Modifier ID Identifier The modifier's unique ID.
Value Double The modifier's value.
Operation VarInt Enum The operation to be applied upon the value. Can be one of the following:
  • 0 - Add
  • 1 - Multiply base
  • 2 - Multiply total
Slot VarInt Enum The item slot placement required for the modifier to have effect.
Can be one of the following:
  • 0 - Any
  • 1 - Main hand
  • 2 - Off hand
  • 3 - Hand
  • 4 - Feet
  • 5 - Legs
  • 6 - Chest
  • 7 - Head
  • 8 - Armor
  • 9 - Body
14 minecraft:custom_model_data Value for the item predicate when using custom item models.
More info can be found here.
As follows:
Name Type Description
Floats Prefixed Array of Float
Flags Prefixed Array of Boolean
Strings Prefixed Array of String
Colors Prefixed Array of Int
15 minecraft:tooltip_display Allows you to hide all or parts of the item tooltip. As follows:
Name Type Description
Hide tooltip Boolean Whether to hide the tooltip entirely.
Hidden components Prefixed Array of VarInt Enum The IDs of data components in the minecraft:data_component_type registry to hide.
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:
Name Type Description
Cost VarInt
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.
no fields
18 minecraft:enchantment_glint_override Overrides the item glint resulted from enchantments As follows:
Name Type Description
Has Glint Boolean
19 minecraft:intangible_projectile Marks the projectile as intangible (cannot be picked-up). As follows:
Name Type Description
Empty NBT Always an empty Compound Tag.
20 minecraft:food Makes the item restore the player's hunger bar when consumed. As follows:
Name Type Description
Nutrition VarInt Non-negative
Saturation Modifier Float How much saturation will be given after consuming the item.
Can Always Eat Boolean Whether the item can always be eaten, even at full hunger.
21 minecraft:consumable Makes the item consumable. As follows:
Name Type Description
Consume seconds Float How long it takes to consume the item.
Animation VarInt Enum 0: none, 1: eat, 2: drink, 3: block, 4: bow, 5: spear, 6: crossbow, 7: spyglass, 8: toot_horn, 9: brush
Sound ID or Sound Event ID in the minecraft:sound_event registry, or an inline definition.
Has consume particles Boolean
Effects Prefixed Array of Consume Effect Effects to apply on consumption. See Consume Effect.
22 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:
Name Type Description
Remainder Slot
23 minecraft:use_cooldown Cooldown to apply on use of the item. As follows:
Name Type Description
Seconds Float
Cooldown group Optional Identifier Group of items to apply the cooldown to. Only present if Has cooldown group is true; otherwise defaults to the item's identifier.
24 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:
Name Type Description
Types Identifier Tag specifying damage types the item is immune to. Not prefixed by '#'!.
25 minecraft:tool Alters the speed at which this item breaks certain blocks As follows:
Name Type Description
Rule Blocks Prefixed Array ID Set The blocks this rule applies to (IDs in the minecraft:block registry).
Has Speed Boolean
Speed Optional Float The speed at which the tool breaks this rules' blocks. Only present if Has Speed is true.
Has Correct Drop For Blocks Boolean
Correct Drop For Blocks Optional Boolean Whether items should drop only if this is the correct tool. Only present if Has Correct Drop For Blocks is true.
Default Mining Speed Float The mining speed in case none of the previous rule were matched.
Damage Per Block VarInt The amount of damage the item takes per block break.
Can Destroy Blocks In Creative Boolean If false, this tool prevents the player from breaking blocks in creative mode.
26 minecraft:weapon Item treated as a weapon As follows:
Name Type Description
Damage Per Attack VarInt
Disable Blocking For Float In Seconds
27 minecraft:enchantable Allows the item to be enchanted by an enchanting table. As follows:
Name Type Description
Value VarInt Opaque internal value controlling how expensive enchantments may be offered.
28 minecraft:equippable Allows the item to be equipped by the player. As follows:
Name Type Description
Slot VarInt Enum 0: mainhand, 1: feet, 2: legs, 3: chest, 4: head, 5: offhand, 6: body
Equip sound ID or Sound Event ID in the minecraft:sound_event registry, or an inline definition.
Has model Boolean
Model Optional Identifier Only present if Has model is true.
Has camera overlay Boolean
Camera overlay Optional Identifier Only present if Has camera overlay is true.
Has allowed entities Boolean
Allowed entities Optional ID Set IDs in the minecraft:entity_type registry. Only present if Has allowed entities is true.
Dispensable Boolean
Swappable Boolean
Damage on hurt Boolean
29 minecraft:repairable Items that can be combined with this item in an anvil to repair it. As follows:
Name Type Description
Items ID Set IDs in the minecraft:item registry.
30 minecraft:glider Makes the item function like elytra. no fields
31 minecraft:tooltip_style Custom textures for the item tooltip. As follows:
Name Type Description
Style Identifier
32 minecraft:death_protection Makes the item function like a totem of undying. As follows:
Name Type Description
Effects Prefixed Array of Consume Effect Effects to apply on consumption. See Consume Effect.
33 minecraft:blocks_attacks Makes the item act like a shield. As follows:
Name Type Description
Block delay seconds Float
Disable cooldown scale Float
Damage reductions Horizontal blocking angle Prefixed Array Float
Type Prefixed Optional ID Set IDs in the minecraft:damage_kind registry.
Base Float
Factor Float
Item damage threshold Float
Item damage base Float
Item damage factor Float
Bypassed by Prefixed Optional Identifier
Block sound Prefixed Optional ID Or Sound Event
Disable sound Prefixed Optional ID Or Sound Event
34 minecraft:stored_enchantments The enchantments stored in this enchanted book. As follows:
Name Type Description
Enchantment Type ID Prefixed Array VarInt Enum The ID of the enchantment in the enchantment registry.
Level VarInt The level of the enchantment.
35 minecraft:dyed_color Color of dyed leather armor. As follows:
Name Type Description
Color Int The RGB components of the color, encoded as an integer.
36 minecraft:map_color Color of the markings on the map item model. As follows:
Name Type Description
Color Int The RGB components of the color, encoded as an integer.
37 minecraft:map_id The ID of the map. As follows:
Name Type Description
ID VarInt
38 minecraft:map_decorations Icons present on a map. As follows:
Name Type Description
Data NBT Always a Compound Tag.
39 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:
Name Type Description
Type VarInt Enum Type of post processing. Can be either:
  • 0 - Lock
  • 1 - Scale
40 minecraft:charged_projectiles Projectiles loaded into a charged crossbow. As follows:
Name Type Description
Projectiles Prefixed Array of Slot The projectiles.
41 minecraft:bundle_contents Contents of a bundle. As follows:
Name Type Description
Items Prefixed Array of Slot The projectiles.
42 minecraft:potion_contents Visual and effects of a potion item. As follows:
Name Type Description
Has Potion ID 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 Optional VarInt The ID of the potion type in the potion registry. Only present if Has Potion ID is true.
Has Custom Color Boolean Whether this potion has a custom color. If false, it uses the default color associated with the potion type.
Custom Color Optional Int The RGB components of the color, encoded as an integer. Only present if Has Custom Color is true.
Custom Effects Prefixed Array of Potion Effect Any custom effects the potion might have. See Potion Effect.
Custom Name String
43 minecraft:potion_duration_scale A duration multiplier for items that also have the minecraft:potion_contents component. As follows:
Name Type
Effect Multiplier Float
44 minecraft:suspicious_stew_effects Effects granted by a suspicious stew. As follows:
Name Type Description
Effect Type ID Prefixed Array VarInt Enum The ID of the effect in the potion effect type registry.
Duration VarInt The duration of the effect.
45 minecraft:writable_book_content Content of a writable book. As follows:
Name Type Description
Page Raw Content Prefixed Array (100) String (1024) The raw text of the page.
Has Filtered Content Boolean
Filtered Content Optional String (1024) The content after passing through chat filters. Only present if Has Filtered Content is true.
46 minecraft:written_book_content Content of a written and signed book. As follows:
Name Type Description
Raw Title String (32) The raw title of the book.
Has Filtered Title Boolean
Filtered Title Optional String (32) The title after going through chat filters. Only present if Has Filtered Title is true.
Author String
Generation VarInt
Page Raw Content Prefixed Array (100) TextComponent (1024) The raw text of the page.
Has Filtered Content Boolean
Filtered Content Optional Text Component (1024) The content after passing through chat filters. Only present if Has Filtered Content is true.
Resolved Boolean Whether entity selectors have already been resolved.
47 minecraft:trim Armor's trim pattern and color As follows:
Name Type Description
Trim Material ID or Trim Material ID in the minecraft:trim_material registry, or an inline definition.
Trim Pattern ID or Trim Pattern ID in the minecraft:trim_pattern registry, or an inline definition.
48 minecraft:debug_stick_state State of the debug stick As follows:
Name Type Description
Data NBT States of previously interacted blocks. Always a Compound Tag.
49 minecraft:entity_data Data for the entity to be created from this item. As follows:
Name Type Description
Data NBT Always a Compound Tag.
50 minecraft:bucket_entity_data Data of the entity contained in this bucket. As follows:
Name Type Description
Data NBT Always a Compound Tag.
51 minecraft:block_entity_data Data of the block entity to be created from this item. As follows:
Name Type Description
Data NBT Always a Compound Tag.
52 minecraft:instrument The sound played when using a goat horn. As follows:
Name Type Description
Instrument ID or Instrument ID in the minecraft:instrument registry, or an inline definition.
53 minecraft:provides_trim_material Used to make an item into a valid armor trim material. As follows:
Name Type Description
Mode Byte Enum Defines how the following field is read, either referenced or direct.
Material Varies
Mode Data Description
0 Identifier The name of a material.
1 ID or Trim Material An ID in the minecraft:trim_material registry or a direct trim material definition.
54 minecraft:ominous_bottle_amplifier Amplifier for the effect of an ominous bottle. As follows:
Name Type Description
Amplifier VarInt Between 0 and 4.
55 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 Jukebox Song Type is 0) will cause the client to fail to parse it and subsequently disconnect, which is likely an unintended bug.
As follows:
Name Type Description
Mode Byte Enum Whether the jukebox song is specified directly, or just referenced by name. This defines how the following field is read.
Jukebox Song Varies
Mode Data Description
0 Identifier The name of a jukebox song in its respective registry.
1 ID or Jukebox Song ID in the minecraft:jukebox_song registry or a direct jukebox song.
56 minecraft:provides_banner_patterns Used to make an item into a valid banner pattern material. As follows:
Name Type Description
Key Identifier A pattern identifier like #minecraft:pattern_item/globe.
57 minecraft:recipes The recipes this knowledge book unlocks. As follows:
Name Type Description
Data NBT Always a Compound Tag.
58 minecraft:lodestone_tracker The lodestone this compass points to. As follows:
Name Type Description
Has Global Position Boolean Whether this lodestone points to a position, otherwise it spins randomly.
Dimension Identifier The dimension the compass points to. Only present if Has Global Position is true.
Position Position The position the compass points to. Only present if Has Global Position is true.
Tracked Boolean Whether the component is removed when the associated lodestone is broken.
59 minecraft:firework_explosion Properties of a firework star. As follows:
Name Type Description
Explosion Firework Explosion See Firework Explosion.
60 minecraft:fireworks Properties of a firework. As follows:
Name Type Description
Flight Duration VarInt
Explosions Prefixed Array of Firework Explosion See Firework Explosion.
61 minecraft:profile Game Profile of a player's head. As follows:
Name Type Description
Has Name Boolean
Name Optional String (16) Only present if Has Name is true.
Has Unique ID Boolean
Unique ID Optional UUID Only present if Has Unique ID is true.
Property Name Prefixed Array String (64)
Value String
Has Signature Boolean
Signature String (1024) Only present if Has Signature is true.
62 minecraft:note_block_sound Sound played by a note block when this player's head is placed on top of it. As follows:
Name Type Description
Sound Identifier
63 minecraft:banner_patterns Patterns of a banner or banner applied to a shield. As follows:
Name Type Description
Layer Pattern Type Prefixed Array VarInt Identifier used to determine the data that follows. It can be either:
  • 0 - Directly represents a pattern, with the necessary data following.
  • Anything else - References a pattern in its registry, by the ID of Pattern Type - 1.
Asset ID Optional Identifier Identifier of the asset. Only present if Pattern Type is 0.
Translation Key Optional String Only present if Pattern Type is 0.
Color Dye Color See Dye Color.
64 minecraft:base_color Base color of the banner applied to a shield. As follows:
Name Type Description
Color Dye Color See Dye Color.
65 minecraft:pot_decorations Decorations on the four sides of a pot. As follows:
Name Type Description
Decorations Prefixed Array (4) of VarInt Enum The ID of the items in the item registry.
66 minecraft:container Items inside a container of any type. As follows:
Name Type Description
Items Prefixed Array (256) of Slot
67 minecraft:block_state State of a block. As follows:
Name Type Description
Property Name Prefixed Array String
Value String
68 minecraft:bees Bees inside a hive. As follows:
Name Type Description
Bee Entity Data Prefixed Array NBT Custom data for the entity, always a Compound Tag. Same structure as the minecraft:custom_data component.
Ticks In Hive VarInt
Min Ticks In Hive VarInt
69 minecraft:lock Name of the necessary key to open this container. As follows:
Name Type Description
Key NBT Always a String Tag.
70 minecraft:container_loot Loot table for an unopened container. As follows:
Name Type Description
Data NBT Always a Compound Tag.
71 minecraft:break_sound Changes the sound that plays when the item breaks. As follows:
Name Type Description
Sound Event ID or Sound Event ID in the minecraft:sound_event registry, or an inline definition.
72 minecraft:villager/variant The biome variant of a villager. As follows:
Name Type Description
Variant VarInt Enum An ID in the minecraft:villager_type registry.
73 minecraft:wolf/variant The variant of a wolf. As follows:
Name Type Description
Variant VarInt Enum An ID in the minecraft:wolf_variant registry.
74 minecraft:wolf/sound_variant The type of sounds that a wolf makes. As follows:
Name Type Description
Variant VarInt Enum An ID in the minecraft:wolf_sound_variant registry.
75 minecraft:wolf/collar The dye color of the wolf's collar. As follows:
Name Type
Color Dye Color
76 minecraft:fox/variant The variant of a fox. As follows:
Name Type Description
Variant VarInt Enum 0: red, 1: snow.
77 minecraft:salmon/size The size of a salmon. As follows:
Name Type Description
Type VarInt Enum 0: small, 1: medium, 2: large.
78 minecraft:parrot/variant The variant of a parrot. As follows:
Name Type Description
Variant VarInt Enum An ID in the minecraft:parrot_type registry.
79 minecraft:tropical_fish/pattern The pattern of a tropical fish. As follows:
Name Type Description
Pattern VarInt Enum 0: kob, 1: sunstreak, 2: snooper, 3: dasher, 4: brinely, 5: spotty, 6: flopper, 7: stripey, 8: glitter, 9: blockfish, 10: betty, 11: clayfish.
80 minecraft:tropical_fish/base_color The base color of a tropical fish. As follows:
Name Type
Color Dye Color
81 minecraft:tropical_fish/pattern_color The pattern color of a tropical fish. As follows:
Name Type
Color Dye Color
82 minecraft:mooshroom/variant The variant of a mooshroom. As follows:
Name Type Description
Variant VarInt Enum 0: red, 1: brown.
83 minecraft:rabbit/variant The variant of a rabbit. As follows:
Name Type Description
Variant VarInt Enum 0: brown, 1: white, 2: black, 3: white splotched, 4: gold, 5: salt, 6: evil.
84 minecraft:pig/variant The variant of a pig. As follows:
Name Type Description
Variant VarInt Enum An ID in the minecraft:pig_variant registry.
85 minecraft:cow/variant The variant of a cow. As follows:
Name Type Description
Variant VarInt Enum An ID in the minecraft:cow_variant registry.
86 minecraft:chicken/variant The variant of a chicken. As follows:
Name Type Description
Mode Byte Enum Defines how the following field is read.
Variant Varies
Mode Data Description
0 Identifier The name of a chicken variant.
1 VarInt An ID in the minecraft:chicken_variant registry.
87 minecraft:frog/variant The variant of a frog. As follows:
Name Type Description
Variant VarInt Enum An ID in the minecraft:frog_variant registry.
88 minecraft:horse/variant The variant of a horse. As follows:
Name Type Description
Variant VarInt Enum 0: white, 1: creamy, 2: chestnut, 3: brown, 4: black, 5: gray, 6: dark brown.
89 minecraft:painting/variant The variant of a painting. As follows:
Name Type
Variant Painting Variant
90 minecraft:llama/variant The variant of a llama. As follows:
Name Type Description
Variant VarInt Enum 0: creamy, 1: white, 2: brown, 3: gray.
91 minecraft:axolotl/variant The variant of an axolotl. As follows:
Name Type Description
Variant VarInt Enum 0: lucy, 1: wild, 2: gold, 3: cyan, 4: blue.
92 minecraft:cat/variant The variant of a cat. As follows:
Name Type Description
Variant VarInt Enum An ID in the minecraft:cat_variant registry.
93 minecraft:cat/collar The dye color of the cat's collar. As follows:
Name Type
Color Dye Color
94 minecraft:sheep/color The color of a sheep. As follows:
Name Type
Color Dye Color
95 minecraft:shulker/color The color of a shulker. As follows:
Name Type
Color Dye Color

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 Prefixed Optional ID Set IDs in the minecraft:block registry. Present only when tied to specific types of blocks.
Properties Prefixed Optional Prefixed Array of Property See Property structure below. Present only when tied to specific properties of blocks.
NBT Prefixed Optional NBT
Data Components Prefixed Array of Exact Data Component Matcher A list of data components which must exactly match the target block.
Partial Data Component Predicates Prefixed Array of Partial Data Component Matcher A list of predicates to match the block's data components. Max length = 64.

Property

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.

Exact Data Component Matcher

Name Type Description
Type VarInt Enum 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 VarInt Enum 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 NBT Compound Data component predicate encoded as an NBT compound tag.

Dye Color

A color from one of the 16 dye types.

Name Type Description
Color VarInt Enum Can be one of the following:
  • 0 - White
  • 1 - Orange
  • 2 - Magenta
  • 3 - Light Blue
  • 4 - Yellow
  • 5 - Lime
  • 6 - Pink
  • 7 - Gray
  • 8 - Light Gray
  • 9 - Cyan
  • 10 - Purple
  • 11 - Blue
  • 12 - Brown
  • 13 - Green
  • 14 - Red
  • 15 - Black

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:
  • 0 - Small ball
  • 1 - Large ball
  • 2 - Star
  • 3 - Creeper
  • 4 - Burst
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.
This section is missing information about: This behavior seems to be entirely server-sided. Does the presence of this field actually has any noticeable impact on the client?.
 
Please expand the section to include this information. Further details may exist on the talk page.
Hidden Effect Optional Detail Only present if Has Hidden Effect is true.

Trim Material

Name Type Description
Suffix String
Overrides Armor Material Type Prefixed Array Identifier
Overriden Asset Name String
Description Text Component

Trim Pattern

Name Type Description
Asset Name String
Template Item VarInt
Description Text Component
Decal Boolean

Consume Effect

Name Type Description
Type VarInt The ID of the effect in the consume effect registry.
Data Varies See below
Type Name Data
0 minecraft:apply_effects
Name Type Description
Effects Array of Potion Effect
Probability Float
1 minecraft:remove_effects
Name Type Description
Effects ID Set
2 minecraft:clear_all_effects no fields
3 minecraft:teleport_randomly
Name Type Description
Diameter Float
4 minecraft:play_sound
Name Type Description
Sound Sound Event


Instrument

Name Type Description
Sound Event ID or Sound Event The sound to be played.
Sound range Float The maximum range of the sound.
Range Float The range of the instrument.
Description Text Component Description shown in the item tooltip.

Jukebox Song

Name Type Description
Sound Event ID or Sound Event The sound to be played.
Description Text Component The description shown in the item lore.
Duration Float The duration the songs should play for, in seconds.
Output VarInt The output strength given by a comparator. Between 0 and 15.
This article is licensed under a Creative Commons Attribution-ShareAlike 3.0 license.
 
This article has been imported from wiki.vg or is a derivative of such a page. Thus, the wiki's usual license does not apply.
Derivative works must be licensed using the same or a compatible license.