Difference between revisions of "Registry Data"

From wiki.vg
Jump to navigation Jump to search
(→‎Armor Trim Pattern: Even more work)
m (Removed extra space)
 
(22 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
The ability for the server to send customized registries to the client was introduced in 1.16.3, which allows for a great deal of customization over certain features of the game.
 
The ability for the server to send customized registries to the client was introduced in 1.16.3, which allows for a great deal of customization over certain features of the game.
  
== Format ==
+
= Overview =
  
 
The server sends these registries to the client via [[Protocol#Registry_Data|Registry Data]] packet during the configuration phase.
 
The server sends these registries to the client via [[Protocol#Registry_Data|Registry Data]] packet during the configuration phase.
Line 11: Line 11:
 
  ! State
 
  ! State
 
  ! Bound To
 
  ! Bound To
  ! Field Name
+
  ! colspan="2"| Field Name
  ! Field Type
+
  ! colspan="2"| Field Type
 
  ! Notes
 
  ! Notes
 
  |-
 
  |-
  | rowspan="1"| 0x05
+
  | rowspan="6"| [[Protocol#Registry_Data|Varies]]
  | rowspan="1"| Configuration
+
  | rowspan="6"| Configuration
  | rowspan="1"| Client
+
  | rowspan="6"| Client
  | Registry Data
+
  |-
  | [[NBT|NBT Tag Compound]]
+
| colspan="2"| Registry ID
  | Information included below.
+
| colspan="2"| {{Type|Identifier}}
 +
|
 +
|-
 +
| colspan="2"| Entry Count
 +
| colspan="2"| {{Type|VarInt}}
 +
| Number of entries in the following array.
 +
|-
 +
| rowspan="3"| Entries
 +
| Entry ID
 +
| rowspan="3"| {{Type|Array}}
 +
| {{Type|Identifier}}
 +
|
 +
|-
 +
| Has Data
 +
  | {{Type|Boolean}}
 +
| Whether the entry has any data following.
 +
|-
 +
| Data
 +
| {{Type|NBT}}
 +
  | Entry data. Only present if Has Data is true.
 
  |}
 
  |}
  
The '''Registry Data''' field represents a list of all available registries in the form of a [[NBT#Specification:compound_tag|Compound Tag]]. Elements in this compound are defined by the [[#Registry|registry information]], associated with the registry's name, as shown in the example below:
+
The structure of the entries' data depends on the registry specified in the packet. The structure for each [[#Available_Registries|available registry]] is defined below.
  
<syntaxhighlight lang="java">
+
Throughout the configuration phase, the server will send multiple [[Protocol#Registry_Data|Registry Data]] packets, each one pertaining to a different registry.
{
 
    "minecraft:worldgen/biome": {
 
        "type": "minecraft:worldgen/biome",
 
        "value": [
 
            {
 
                "name": "minecraft:ocean",
 
                "id": 0,
 
                "element": { /* Element */ }
 
            },
 
            {
 
                "name": "minecraft:plains",
 
                "id": 1,
 
                "element": { /* Element */ }
 
            },
 
            { /* Registry Entry */ }
 
            ...
 
        ]
 
    },
 
    "minecraft:dimension_type": { /* Registry */ },
 
    "minecraft:chat_type": { /* Registry */ },
 
    ...
 
}
 
</syntaxhighlight>
 
  
=== Registry ===
+
== Client/Server Exchange ==
  
The Registry [[NBT#Specification:compound_tag|Compound Tag]] specifies the type of the registry, and a list of [[#Registry_Entry|registry entries]].
+
In order to save bandwidth, the server omits the data for entries pertaining to a data pack that is mutually supported by both the client and server. The exchange is as follows:
  
{{warning|The name of the registry in the Registry Data is always the same to the registry type in the Notchian implementation.}}
+
# '''S'''→'''C''': [[Protocol#Clientbound_Known_Packs|Clientbound Known Packs]]
 +
# '''C'''→'''S''': [[Protocol#Serverbound_Known_Packs|Serverbound Known Packs]]
 +
# ''Server computes the mutually supported data packs''
 +
# '''S'''→'''C''': Multiple [[Protocol#Registry_Data|Registry Data]] (excluding mutually supported data)
  
{| class="wikitable"
 
!Name
 
!Type
 
!style="width: 250px;" colspan="2"| Notes
 
|-
 
| type
 
| TAG_String
 
| The type of the registry.
 
|-
 
| value
 
| TAG_List of TAG_Compound
 
| List of [[#Registry_Entry|registry entries]]. The format of the entries is defined by the value of the previous field.
 
|}
 
 
=== Registry Entry ===
 
  
The Registry Entry [[NBT#Specification:compound_tag|Compound Tag]] specifies a single entry of a [[#Registry|Registry]].
+
{{Warning2|The ordering in which the entries of a registry are sent defines the numeric ID that they will be assigned to. It is essential to maintain consistency between server and client, since many parts of the protocol reference these entries by their ID. The client will disconnect upon receiving a reference to a non-existing entry.}}
  
{| class="wikitable"
+
= Available Registries =
!Name
 
!Type
 
!style="width: 250px;" colspan="2"| Notes
 
|-
 
| name
 
| TAG_String
 
| The name of the entry.
 
|-
 
| id
 
| TAG_Int
 
| The protocol ID of the entry.
 
|-
 
| element
 
| TAG_Compound
 
| The actual data of the entry.
 
{{warning|This field is context-dependent and is based on the '''type''' field of its [[#Registry|Registry]].}}
 
|}
 
  
== Available Registries ==
+
The current release specification allows for eight different registries to be sent to the client. A brief explanation of each of them is presented below, along with the format of their entries' element field.
  
The current release specification allows for six different registries to be sent to the client, six of which are required. A brief explanation of each of them is presented below, along with the format of their entries' element field.
+
'''Fields marked in <span style="border: solid 1px black; background: #d4ecfc; color: #d4ecfc;">__</span> blue represent data for server-side exclusive operations, and thus have no visible impact on the client.'''
  
=== Armor Trim Material ===
+
== Armor Trim Material ==
  
The <code>minecraft:trim_material</code> registry.
+
The <code>minecraft:trim_material</code> registry. It defines various visual properties of trim materials in armors.  
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 108: Line 75:
 
  |-
 
  |-
 
  | colspan="3"| asset_name
 
  | colspan="3"| asset_name
  | colspan="2"| TAG_String
+
  | colspan="2"| [[NBT#Specification:string_tag|String Tag]]
  | colspan="2"| <tba>
+
  | colspan="2"| The trim color model to be rendered on top of the armor.
  | colspan="2"| <tba>
+
The Notchian client uses the corresponding asset located at <code>trims/color_palettes</code>.
 +
  | colspan="2"| Example: "minecraft:amethyst".
 
  |-
 
  |-
 
  | colspan="3"| ingredient
 
  | colspan="3"| ingredient
  | colspan="2"| TAG_String
+
  | colspan="2"| [[NBT#Specification:string_tag|String Tag]]
  | colspan="2"| <tba>
+
  | colspan="2"| The ingredient used.
  | colspan="2"| <tba>
+
This has the visual effect of showing the trimmed armor model on the Smithing Table when the correct item is placed.
 +
  | colspan="2"| Example: "minecraft:copper_ingot".
 
  |-
 
  |-
 
  | colspan="3"| item_model_index
 
  | colspan="3"| item_model_index
  | colspan="2"| TAG_Float
+
  | colspan="2"| [[NBT#Specification:float_tag|Float Tag]]
  | colspan="2"| <tba>
+
  | colspan="2"| Color index of the trim on the armor item when in the inventory.
  | colspan="2"| <tba>
+
  | colspan="2"| Default values vary between 0.1 and 1.0.
 
  |-
 
  |-
 
  | colspan="3"| override_armor_materials
 
  | colspan="3"| override_armor_materials
  | colspan="2"| Optional TAG_Compound
+
  | colspan="2"| Optional [[NBT#Specification:compound_tag|Compound Tag]]
  | colspan="2"| <tba>
+
  | colspan="2"| Asset for different types of armor materials, which overrides the value specified in the asset_name field.
  | colspan="2"| <tba>
+
The Notchian client uses this to give a darker color shade when a trim material is applied to armor of the same material, such as iron applied to iron armor.
 +
  | colspan="2"| The key can be either:
 +
* <code>leather</code>
 +
* <code>chainmail</code>
 +
* <code>iron</code>
 +
* <code>gold</code>
 +
* <code>diamond</code>
 +
* <code>turtle</code>
 +
* <code>netherite</code>
 +
The value accepts the same values as asset_name.
 
  |-
 
  |-
 
  | colspan="3"| description
 
  | colspan="3"| description
  | colspan="2"| TAG_Compound or TAG_String
+
  | colspan="2"| [[NBT#Specification:compound_tag|Compound Tag]] or [[NBT#Specification:string_tag|String Tag]]
  | colspan="2"| <tba>
+
  | colspan="2"| The name of the trim material to be displayed on the armor tool-tip.
  | colspan="2"| <tba>
+
Any styling used in this component is also applied to the trim pattern description.
 +
  | colspan="2"| See [[Text formatting]].
 
  |}
 
  |}
  
----
+
== Armor Trim Pattern ==
 
 
=== Armor Trim Pattern ===
 
  
 
The <code>minecraft:trim_pattern</code> registry. It defines various visual properties of trim patterns in armors.
 
The <code>minecraft:trim_pattern</code> registry. It defines various visual properties of trim patterns in armors.
Line 148: Line 125:
 
  |-
 
  |-
 
  | colspan="3"| asset_id
 
  | colspan="3"| asset_id
  | colspan="2"| TAG_String
+
  | colspan="2"| [[NBT#Specification:string_tag|String Tag]]
 
  | colspan="2"| The trim pattern model to be rendered on top of the armor.
 
  | colspan="2"| The trim pattern model to be rendered on top of the armor.
 
The Notchian client uses the corresponding asset located at <code>trims/models/armor</code>.
 
The Notchian client uses the corresponding asset located at <code>trims/models/armor</code>.
Line 154: Line 131:
 
  |-
 
  |-
 
  | colspan="3"| template_item
 
  | colspan="3"| template_item
  | colspan="2"| TAG_String
+
  | colspan="2"| [[NBT#Specification:string_tag|String Tag]]
 
  | colspan="2"| The template item used for this trim.
 
  | colspan="2"| The template item used for this trim.
 
This has the visual effect of showing the trimmed armor model on the Smithing Table when the correct item is placed.
 
This has the visual effect of showing the trimmed armor model on the Smithing Table when the correct item is placed.
Line 160: Line 137:
 
  |-
 
  |-
 
  | colspan="3"| description
 
  | colspan="3"| description
  | colspan="2"| TAG_Compound or TAG_String
+
  | colspan="2"| [[NBT#Specification:compound_tag|Compound Tag]] or [[NBT#Specification:string_tag|String Tag]]
 
  | colspan="2"| The name of the trim pattern to be displayed on the armor tool-tip.
 
  | colspan="2"| The name of the trim pattern to be displayed on the armor tool-tip.
  | colspan="2"| See [[Chat]].
+
  | colspan="2"| See [[Text formatting]].
 
  |-
 
  |-
 
  | colspan="3"| decal
 
  | colspan="3"| decal
  | colspan="2"| TAG_Byte
+
  | colspan="2"| [[NBT#Specification:byte_tag|Byte Tag]]
 
  | colspan="2"| Whether this trim is a decal.
 
  | colspan="2"| Whether this trim is a decal.
 
  | colspan="2"| 1: true, 0: false.
 
  | colspan="2"| 1: true, 0: false.
 
  |}
 
  |}
  
----
+
== Banner Pattern ==
 +
 
 +
The <code>minecraft:banner_pattern</code> registry. It defines the textures for different banner patterns.
 +
 
 +
{| class="wikitable"
 +
! Name
 +
! Type
 +
! Meaning
 +
! Values
 +
|-
 +
| asset_id
 +
| [[NBT#Specification:string_tag|String Tag]]
 +
| The texture of the pattern.
 +
The Notchian client uses the corresponding asset located at <code>textures/entity/banner</code> or <code>textures/entity/shield</code>, depending on the case.
 +
| Example: "minecraft:diagonal_left".
 +
|-
 +
| translation_key
 +
| [[NBT#Specification:string_tag|String Tag]]
 +
| The translation key representing the banner pattern, shown in the item's tooltip.
 +
It is appended to the banner color when used, resulting in <code><translation_key>.<color></code>.
 +
| Example: "block.minecraft.banner.diagonal_left.blue", which translates to "Blue Per Bend Sinister".
 +
|}
  
=== Biome ===
+
== Biome ==
  
 
The <code>minecraft:worldgen/biome</code> registry. It defines several aesthetic characteristics of the biomes present in the game.
 
The <code>minecraft:worldgen/biome</code> registry. It defines several aesthetic characteristics of the biomes present in the game.
  
{{warning|A registry entry for each biome implemented in the client must exist in the Biome registry, otherwise the client will crash with an exception due to the missing biome.}}
+
Biome entries are referenced in the [[Protocol#Chunk_Biomes|Chunk Biomes]] and [[Protocol#Chunk_Data_and_Update_Light|Chunk Data and Update Light]] packets.
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 185: Line 183:
 
  |-
 
  |-
 
  | colspan="3"| has_precipitation
 
  | colspan="3"| has_precipitation
  | colspan="2"| TAG_Byte
+
  | colspan="2"| [[NBT#Specification:byte_tag|Byte Tag]]
 
  | colspan="2"| Determines whether or not the biome has precipitation.
 
  | colspan="2"| Determines whether or not the biome has precipitation.
 
  | colspan="2"| 1: true, 0: false.  
 
  | colspan="2"| 1: true, 0: false.  
 
  |-
 
  |-
 
  | colspan="3"| temperature
 
  | colspan="3"| temperature
  | colspan="2"| TAG_Float
+
  | colspan="2"| [[NBT#Specification:float_tag|Float Tag]]
 
  | colspan="2"| The temperature factor of the biome.
 
  | colspan="2"| The temperature factor of the biome.
 
Affects foliage and grass color if they are not explicitly set.
 
Affects foliage and grass color if they are not explicitly set.
Line 196: Line 194:
 
  |-
 
  |-
 
  | colspan="3"| temperature_modifier
 
  | colspan="3"| temperature_modifier
  | colspan="2"| Optional TAG_String
+
  | colspan="2"| Optional [[NBT#Specification:string_tag|String Tag]]
 
  | colspan="2"| Modifier that affects the resulting temperature.
 
  | colspan="2"| Modifier that affects the resulting temperature.
 
  | colspan="2"| Can be either:
 
  | colspan="2"| Can be either:
Line 203: Line 201:
 
  |-
 
  |-
 
  | colspan="3"| downfall
 
  | colspan="3"| downfall
  | colspan="2"| TAG_Float
+
  | colspan="2"| [[NBT#Specification:float_tag|Float Tag]]
 
  | colspan="2"| The downfall factor of the biome.
 
  | colspan="2"| The downfall factor of the biome.
 
Affects foliage and grass color if they are not explicitly set.
 
Affects foliage and grass color if they are not explicitly set.
Line 209: Line 207:
 
  |-
 
  |-
 
  | colspan="3"| effects
 
  | colspan="3"| effects
  | colspan="2"| TAG_Compound
+
  | colspan="2"| [[NBT#Specification:compound_tag|Compound Tag]]
 
  | colspan="2"| Biome special effects.
 
  | colspan="2"| Biome special effects.
 
  | colspan="2"| See [[#Effects|Effects]].
 
  | colspan="2"| See [[#Effects|Effects]].
 
  |}
 
  |}
  
==== Effects ====
+
=== Effects ===
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 223: Line 221:
 
  |-
 
  |-
 
  | colspan="3"| fog_color
 
  | colspan="3"| fog_color
  | colspan="2"| TAG_Int
+
  | colspan="2"| [[NBT#Specification:int_tag|Int Tag]]
 
  | colspan="2"| The color of the fog effect when looking past the view distance.
 
  | colspan="2"| The color of the fog effect when looking past the view distance.
 
  | colspan="2"| Example: 8364543, which is #7FA1FF in RGB.
 
  | colspan="2"| Example: 8364543, which is #7FA1FF in RGB.
 
  |-
 
  |-
 
  | colspan="3"| water_color
 
  | colspan="3"| water_color
  | colspan="2"| TAG_Int
+
  | colspan="2"| [[NBT#Specification:int_tag|Int Tag]]
 
  | colspan="2"| The tint color of the water blocks.
 
  | colspan="2"| The tint color of the water blocks.
 
  | colspan="2"| Example: 8364543, which is #7FA1FF in RGB.
 
  | colspan="2"| Example: 8364543, which is #7FA1FF in RGB.
 
  |-
 
  |-
 
  | colspan="3"| water_fog_color
 
  | colspan="3"| water_fog_color
  | colspan="2"| TAG_Int
+
  | colspan="2"| [[NBT#Specification:int_tag|Int Tag]]
 
  | colspan="2"| The color of the fog effect when looking past the view distance when underwater.
 
  | colspan="2"| The color of the fog effect when looking past the view distance when underwater.
 
  | colspan="2"| Example: 8364543, which is #7FA1FF in RGB.
 
  | colspan="2"| Example: 8364543, which is #7FA1FF in RGB.
 
  |-
 
  |-
 
  | colspan="3"| sky_color
 
  | colspan="3"| sky_color
  | colspan="2"| TAG_Int
+
  | colspan="2"| [[NBT#Specification:int_tag|Int Tag]]
 
  | colspan="2"| The color of the sky.
 
  | colspan="2"| The color of the sky.
 
  | colspan="2"| Example: 8364543, which is #7FA1FF in RGB.
 
  | colspan="2"| Example: 8364543, which is #7FA1FF in RGB.
 
  |-
 
  |-
 
  | colspan="3"| foliage_color
 
  | colspan="3"| foliage_color
  | colspan="2"| Optional TAG_Int
+
  | colspan="2"| Optional [[NBT#Specification:int_tag|Int Tag]]
 
  | colspan="2"| The tint color of leaves.
 
  | colspan="2"| The tint color of leaves.
 
If not specified, the foliage color is calculated based on biome <code>temperature</code> and <code>downfall</code>.
 
If not specified, the foliage color is calculated based on biome <code>temperature</code> and <code>downfall</code>.
Line 249: Line 247:
 
  |-
 
  |-
 
  | colspan="3"| grass_color
 
  | colspan="3"| grass_color
  | colspan="2"| Optional TAG_Int
+
  | colspan="2"| Optional [[NBT#Specification:int_tag|Int Tag]]
 
  | colspan="2"| The tint color of the grass.
 
  | colspan="2"| The tint color of the grass.
 
If not specified, the grass color is calculated based on biome <code>temperature</code> and <code>downfall</code>.
 
If not specified, the grass color is calculated based on biome <code>temperature</code> and <code>downfall</code>.
Line 255: Line 253:
 
  |-
 
  |-
 
  | colspan="3"| grass_color_modifier
 
  | colspan="3"| grass_color_modifier
  | colspan="2"| Optional TAG_String
+
  | colspan="2"| Optional [[NBT#Specification:string_tag|String Tag]]
 
  | colspan="2"| Modifier that affects the resulting grass color.  
 
  | colspan="2"| Modifier that affects the resulting grass color.  
 
  | colspan="2"| Can be either:
 
  | colspan="2"| Can be either:
Line 263: Line 261:
 
  |-
 
  |-
 
  | colspan="3"| particle
 
  | colspan="3"| particle
  | colspan="2"| Optional TAG_Compound
+
  | colspan="2"| Optional [[NBT#Specification:compound_tag|Compound Tag]]
 
  | colspan="2"| Ambient visual particles.
 
  | colspan="2"| Ambient visual particles.
 
  | colspan="2"| See [[#Particle|Particle]].
 
  | colspan="2"| See [[#Particle|Particle]].
 
  |-
 
  |-
 
  | colspan="3"| ambient_sound
 
  | colspan="3"| ambient_sound
  | colspan="2"| Optional TAG_String or TAG_Compound
+
  | colspan="2"| Optional [[NBT#Specification:string_tag|String Tag]] or [[NBT#Specification:compound_tag|Compound Tag]]
 
  | colspan="2"| Ambient soundtrack that starts playing when entering the biome, and fades out when exiting it.
 
  | colspan="2"| Ambient soundtrack that starts playing when entering the biome, and fades out when exiting it.
 
  | colspan="2"| Can be either:
 
  | colspan="2"| Can be either:
* as a TAG_String: the ID of a soundtrack, such as "minecraft:ambient.basalt_deltas.loop".
+
* as a [[NBT#Specification:string_tag|String Tag]]: the ID of a soundtrack, such as "minecraft:ambient.basalt_deltas.loop".
* as a TAG_Compound: see [[#Ambient sound|Ambient sound]].
+
* as a [[NBT#Specification:compound_tag|Compound Tag]]: see [[#Ambient sound|Ambient sound]].
 
  |-
 
  |-
 
  | colspan="3"| mood_sound
 
  | colspan="3"| mood_sound
  | colspan="2"| Optional TAG_Compound
+
  | colspan="2"| Optional [[NBT#Specification:compound_tag|Compound Tag]]
 
  | colspan="2"| Additional ambient sound that plays in moody situations. Moodiness increases when blocks around the player are at both sky and block light level zero, and decreases otherwise.
 
  | colspan="2"| Additional ambient sound that plays in moody situations. Moodiness increases when blocks around the player are at both sky and block light level zero, and decreases otherwise.
 
The moodiness calculation happens once per tick, and after reaching a certain value, the ambient mood sound is played.
 
The moodiness calculation happens once per tick, and after reaching a certain value, the ambient mood sound is played.
Line 281: Line 279:
 
  |-
 
  |-
 
  | colspan="3"| additions_sound
 
  | colspan="3"| additions_sound
  | colspan="2"| Optional TAG_Compound
+
  | colspan="2"| Optional [[NBT#Specification:compound_tag|Compound Tag]]
 
  | colspan="2"| Additional ambient sound that has a chance of playing randomly every tick.
 
  | colspan="2"| Additional ambient sound that has a chance of playing randomly every tick.
 
  | colspan="2"| See [[#Additions sound|Additions sound]].
 
  | colspan="2"| See [[#Additions sound|Additions sound]].
 
  |-
 
  |-
 
  | colspan="3"| music
 
  | colspan="3"| music
  | colspan="2"| Optional TAG_Compound
+
  | colspan="2"| Optional [[NBT#Specification:compound_tag|Compound Tag]]
 
  | colspan="2"| Music properties for the biome.
 
  | colspan="2"| Music properties for the biome.
 
  | colspan="2"| See [[#Music|Music]].
 
  | colspan="2"| See [[#Music|Music]].
 
  |}
 
  |}
  
==== Particle ====
+
=== Particle ===
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 300: Line 298:
 
  |-
 
  |-
 
  | colspan="3"| options
 
  | colspan="3"| options
  | colspan="2"| TAG_Compound
+
  | colspan="2"| [[NBT#Specification:compound_tag|Compound Tag]]
 
  | colspan="2"| Particle type and related options.
 
  | colspan="2"| Particle type and related options.
 
  | colspan="2"| See [[#Particle options|Particle options]].
 
  | colspan="2"| See [[#Particle options|Particle options]].
 
  |-
 
  |-
 
  | colspan="3"| probability
 
  | colspan="3"| probability
  | colspan="2"| TAG_Float
+
  | colspan="2"| [[NBT#Specification:float_tag|Float Tag]]
 
  | colspan="2"| The chance for the particle to be spawned. Ambient particles are attempted to be spawned multiple times every tick.
 
  | colspan="2"| The chance for the particle to be spawned. Ambient particles are attempted to be spawned multiple times every tick.
 
  | colspan="2"| The default values vary between 0.0 and 1.0.
 
  | colspan="2"| The default values vary between 0.0 and 1.0.
 
  |}
 
  |}
  
==== Particle options ====
+
=== Particle options ===
  
 
{{Need Info|The extra data specified in the [[Protocol#Particle|Particle]] definitions is missing information to allow the particle to be successfully serialized as NBT.<br>Is it here the best place to define them, or somewhere else?}}
 
{{Need Info|The extra data specified in the [[Protocol#Particle|Particle]] definitions is missing information to allow the particle to be successfully serialized as NBT.<br>Is it here the best place to define them, or somewhere else?}}
Line 321: Line 319:
 
  |-
 
  |-
 
  | colspan="3"| type
 
  | colspan="3"| type
  | colspan="2"| TAG_String
+
  | colspan="2"| [[NBT#Specification:string_tag|String Tag]]
 
  | colspan="2"| The name of the particle.
 
  | colspan="2"| The name of the particle.
 
  | colspan="2"| See [[Protocol#Particle|protocol particle data]].
 
  | colspan="2"| See [[Protocol#Particle|protocol particle data]].
Line 331: Line 329:
 
  |}
 
  |}
  
==== Ambient sound ====
+
=== Ambient sound ===
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 340: Line 338:
 
  |-
 
  |-
 
  | colspan="3"| sound_id
 
  | colspan="3"| sound_id
  | colspan="2"| TAG_String
+
  | colspan="2"| [[NBT#Specification:string_tag|String Tag]]
 
  | colspan="2"| The ID of a soundtrack
 
  | colspan="2"| The ID of a soundtrack
 
  | colspan="2"| Example: "minecraft:ambient.basalt_deltas.loop"
 
  | colspan="2"| Example: "minecraft:ambient.basalt_deltas.loop"
 
  |-
 
  |-
 
  | colspan="3"| range
 
  | colspan="3"| range
  | colspan="2"| Optional TAG_Float
+
  | colspan="2"| Optional [[NBT#Specification:float_tag|Float Tag]]
 
  | colspan="2"| The range of the sound. If not specified, the volume is used to calculate the effective range.
 
  | colspan="2"| The range of the sound. If not specified, the volume is used to calculate the effective range.
 
  | colspan="2"|
 
  | colspan="2"|
 
  |}
 
  |}
  
==== Mood sound ====
+
=== Mood sound ===
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 359: Line 357:
 
  |-
 
  |-
 
  | colspan="3"| sound
 
  | colspan="3"| sound
  | colspan="2"| TAG_String
+
  | colspan="2"| [[NBT#Specification:string_tag|String Tag]]
 
  | colspan="2"| The ID of a soundtrack.
 
  | colspan="2"| The ID of a soundtrack.
 
  | colspan="2"| Example: "minecraft:ambient.basalt_deltas.mood"
 
  | colspan="2"| Example: "minecraft:ambient.basalt_deltas.mood"
 
  |-
 
  |-
 
  | colspan="3"| tick_delay
 
  | colspan="3"| tick_delay
  | colspan="2"| TAG_Int
+
  | colspan="2"| [[NBT#Specification:int_tag|Int Tag]]
 
  | colspan="2"| Defines the rate at which the moodiness increase, and also the minimum time between plays.
 
  | colspan="2"| Defines the rate at which the moodiness increase, and also the minimum time between plays.
 
  | colspan="2"| The default value is always 6000.
 
  | colspan="2"| The default value is always 6000.
 
  |-
 
  |-
 
  | colspan="3"| block_search_extent
 
  | colspan="3"| block_search_extent
  | colspan="2"| TAG_Int
+
  | colspan="2"| [[NBT#Specification:int_tag|Int Tag]]
 
  | colspan="2"| The radius used for the block search around the player during moodiness calculation.
 
  | colspan="2"| The radius used for the block search around the player during moodiness calculation.
 
  | colspan="2"| The default value is always 8.
 
  | colspan="2"| The default value is always 8.
 
  |-
 
  |-
 
  | colspan="3"| offset
 
  | colspan="3"| offset
  | colspan="2"| TAG_Double
+
  | colspan="2"| [[NBT#Specification:double_tag|Double Tag]]
 
  | colspan="2"| The distance offset from the player when playing the sound.
 
  | colspan="2"| The distance offset from the player when playing the sound.
 
The sound plays in the direction of the selected block during moodiness calculation, and is magnified by the offset.
 
The sound plays in the direction of the selected block during moodiness calculation, and is magnified by the offset.
Line 380: Line 378:
 
  |}
 
  |}
  
==== Additions sound ====
+
=== Additions sound ===
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 389: Line 387:
 
  |-
 
  |-
 
  | colspan="3"| sound
 
  | colspan="3"| sound
  | colspan="2"| TAG_String
+
  | colspan="2"| [[NBT#Specification:string_tag|String Tag]]
 
  | colspan="2"| The ID of a soundtrack.
 
  | colspan="2"| The ID of a soundtrack.
 
  | colspan="2"| Example: "minecraft:ambient.basalt_deltas.additions"
 
  | colspan="2"| Example: "minecraft:ambient.basalt_deltas.additions"
 
  |-
 
  |-
 
  | colspan="3"| tick_chance
 
  | colspan="3"| tick_chance
  | colspan="2"| TAG_Double
+
  | colspan="2"| [[NBT#Specification:double_tag|Double Tag]]
 
  | colspan="2"| The chance of the sound playing during the tick.
 
  | colspan="2"| The chance of the sound playing during the tick.
 
  | colspan="2"| The default value is always 0.0111.
 
  | colspan="2"| The default value is always 0.0111.
 
  |}
 
  |}
  
==== Music ====
+
=== Music ===
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 408: Line 406:
 
  |-
 
  |-
 
  | colspan="3"| sound
 
  | colspan="3"| sound
  | colspan="2"| TAG_String
+
  | colspan="2"| [[NBT#Specification:string_tag|String Tag]]
 
  | colspan="2"| The ID of a soundtrack.
 
  | colspan="2"| The ID of a soundtrack.
 
  | colspan="2"| Example: "minecraft:music.nether.basalt_deltas"
 
  | colspan="2"| Example: "minecraft:music.nether.basalt_deltas"
 
  |-
 
  |-
 
  | colspan="3"| min_delay
 
  | colspan="3"| min_delay
  | colspan="2"| TAG_Int
+
  | colspan="2"| [[NBT#Specification:int_tag|Int Tag]]
 
  | colspan="2"| The minimum time in ticks since the last music finished for this music to be able to play.
 
  | colspan="2"| The minimum time in ticks since the last music finished for this music to be able to play.
 
  | colspan="2"| The default value is always 12000.
 
  | colspan="2"| The default value is always 12000.
 
  |-
 
  |-
 
  | colspan="3"| max_delay
 
  | colspan="3"| max_delay
  | colspan="2"| TAG_Int
+
  | colspan="2"| [[NBT#Specification:int_tag|Int Tag]]
 
  | colspan="2"| The maximum time in ticks since the last music finished for this music to be able to play.
 
  | colspan="2"| The maximum time in ticks since the last music finished for this music to be able to play.
 
  | colspan="2"| The default value is always 24000.
 
  | colspan="2"| The default value is always 24000.
 
  |-
 
  |-
 
  | colspan="3"| replace_current_music
 
  | colspan="3"| replace_current_music
  | colspan="2"| TAG_Byte
+
  | colspan="2"| [[NBT#Specification:byte_tag|Byte Tag]]
 
  | colspan="2"| Whether this music can replace the current one.
 
  | colspan="2"| Whether this music can replace the current one.
 
  | colspan="2"| 1: true, 0: false.  
 
  | colspan="2"| 1: true, 0: false.  
 
  |}
 
  |}
  
----
+
== Chat Type ==
  
=== Chat Type ===
+
The <code>minecraft:chat_type</code> registry. It defines the different types of in-game chat and how they're formatted.
  
The <code>minecraft:chat_type</code> registry. It defines the different types of in-game chat and how they're formatted.
+
Chat type entries are referenced in the [[Protocol#Disguised_Chat_Message|Disguised Chat Message]] and [[Protocol#Player_Chat_Message|Player Chat Message]] packets.
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 441: Line 439:
 
  |-
 
  |-
 
  | colspan="3"| chat
 
  | colspan="3"| chat
  | colspan="2"| TAG_Compound
+
  | colspan="2"| [[NBT#Specification:compound_tag|Compound Tag]]
 
  | colspan="2"| The chat decoration.
 
  | colspan="2"| The chat decoration.
 
  | colspan="2"| See [[#Decoration|Decoration]].
 
  | colspan="2"| See [[#Decoration|Decoration]].
 
  |-
 
  |-
 
  | colspan="3"| narration
 
  | colspan="3"| narration
  | colspan="2"| TAG_Compound
+
  | colspan="2"| [[NBT#Specification:compound_tag|Compound Tag]]
 
  | colspan="2"| The narration decoration.
 
  | colspan="2"| The narration decoration.
 
  | colspan="2"| See [[#Decoration|Decoration]].
 
  | colspan="2"| See [[#Decoration|Decoration]].
 
  |}
 
  |}
  
==== Decoration ====
+
=== Decoration ===
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 460: Line 458:
 
  |-
 
  |-
 
  | colspan="3"| translation_key
 
  | colspan="3"| translation_key
  | colspan="2"| TAG_String
+
  | colspan="2"| [[NBT#Specification:string_tag|String Tag]]
 
  | colspan="2"| The translation key representing the chat format. It can also be a formatting string directly.
 
  | colspan="2"| The translation key representing the chat format. It can also be a formatting string directly.
 
  | colspan="2"| Example: "chat.type.text", which translates to "<%s> %s".
 
  | colspan="2"| Example: "chat.type.text", which translates to "<%s> %s".
 
  |-
 
  |-
 
  | colspan="3"| style
 
  | colspan="3"| style
  | colspan="2"| Optional TAG_Compound
+
  | colspan="2"| Optional [[NBT#Specification:compound_tag|Compound Tag]]
 
  | colspan="2"| Optional styling to be applied on the final message.
 
  | colspan="2"| Optional styling to be applied on the final message.
 
Not present in the narration decoration.
 
Not present in the narration decoration.
  | colspan="2"| See [[Chat#Shared_between_all_components|Chat styling]].
+
  | colspan="2"| See [[Text formatting#Styling fields]].
 
  |-
 
  |-
 
  | colspan="3"| parameters
 
  | colspan="3"| parameters
  | colspan="2"| TAG_List of TAG_String
+
  | colspan="2"| [[NBT#Specification:list_tag|List Tag]] of [[NBT#Specification:string_tag|String Tag]]
 
  | colspan="2"| Placeholders used when formatting the string given by the translation_key field.
 
  | colspan="2"| Placeholders used when formatting the string given by the translation_key field.
 
  | colspan="2"| Can be either:
 
  | colspan="2"| Can be either:
 
* <code>sender</code>, for the name of the player sending the message.
 
* <code>sender</code>, for the name of the player sending the message.
 
* <code>target</code>, for the name of the player receiving the message, which may be empty.
 
* <code>target</code>, for the name of the player receiving the message, which may be empty.
* <code>contant</code>, for the actual message.
+
* <code>content</code>, for the actual message.
 
  |}
 
  |}
  
----
+
== Damage Type ==
  
=== Damage Type ===
+
The <code>minecraft:damage_type</code> registry. It defines the different types of damage an entity can sustain.
  
The <code>minecraft:damage_type</code> registry. It defines the different types of damage an entity can sustain.
+
Damage type entries are referenced in the [[Protocol#Damage_Event|Damage Event]] packet.
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 490: Line 488:
 
  !style="width: 40%;" | Meaning
 
  !style="width: 40%;" | Meaning
 
  ! Values
 
  ! Values
  |-
+
  |- style="background: #d4ecfc;"
 
  | message_id
 
  | message_id
  | TAG_String
+
  | [[NBT#Specification:string_tag|String Tag]]
 
  | Id of the death message. The full message is displayed as <code>death.attack.<message_id></code>.
 
  | Id of the death message. The full message is displayed as <code>death.attack.<message_id></code>.
 
  | Example: "onFire".
 
  | Example: "onFire".
  |-
+
  |- style="background: #d4ecfc;"
 
  | scaling
 
  | scaling
  | TAG_String
+
  | [[NBT#Specification:string_tag|String Tag]]
 
  | Whether the damage taken scales with the difficulty.
 
  | Whether the damage taken scales with the difficulty.
 
  | Can be either:
 
  | Can be either:
Line 503: Line 501:
 
* <code>when_caused_by_living_non_player</code>
 
* <code>when_caused_by_living_non_player</code>
 
* <code>always</code>
 
* <code>always</code>
  |-
+
  |- style="background: #d4ecfc;"
 
  | exhaustion
 
  | exhaustion
  | TAG_Float
+
  | [[NBT#Specification:float_tag|Float Tag]]
 
  | The amount of exhaustion caused when suffering this type of damage.
 
  | The amount of exhaustion caused when suffering this type of damage.
 
  | Default values are either 0.0 or 0.1.
 
  | Default values are either 0.0 or 0.1.
 
  |-
 
  |-
 
  | effects
 
  | effects
  | Optional TAG_String
+
  | Optional [[NBT#Specification:string_tag|String Tag]]
 
  | Effect played when the player suffers this damage, including the sound that is played.
 
  | Effect played when the player suffers this damage, including the sound that is played.
 
  | Can be either:
 
  | Can be either:
Line 519: Line 517:
 
* <code>poking</code>
 
* <code>poking</code>
 
* <code>freezing</code>
 
* <code>freezing</code>
  |-
+
  |- style="background: #d4ecfc;"
 
  | death_message_type
 
  | death_message_type
  | Optional TAG_String
+
  | Optional [[NBT#Specification:string_tag|String Tag]]
 
  | Defines how the death message is constructed.
 
  | Defines how the death message is constructed.
 
  | Can be either:
 
  | Can be either:
Line 529: Line 527:
 
  |}
 
  |}
  
----
+
== Dimension Type ==
  
=== Dimension Type ===
+
The <code>minecraft:dimension_type</code> registry. It defines the types of dimension that can be attributed to a world, along with all their characteristics.
  
The <code>minecraft:dimension_type</code> registry. It defines the types of dimension that can be attributed to a world, along with all their characteristics.
+
Dimension type entries are referenced in the [[Protocol#Login_(play)|Login (play)]] and [[Protocol#Respawn|Respawn]] packets.
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 540: Line 538:
 
  !style="width: 40%;" | Meaning
 
  !style="width: 40%;" | Meaning
 
  ! Values
 
  ! Values
  |-
+
  |- style="background: #d4ecfc;"
 
  | fixed_time
 
  | fixed_time
  | Optional TAG_Long
+
  | Optional [[NBT#Specification:long_tag|Long Tag]]
 
  | If set, the time of the day fixed to the specified value.
 
  | If set, the time of the day fixed to the specified value.
 
  | Allowed values vary between 0 and 24000.
 
  | Allowed values vary between 0 and 24000.
 
  |-
 
  |-
 
  | has_skylight
 
  | has_skylight
  | TAG_Byte
+
  | [[NBT#Specification:byte_tag|Byte Tag]]
 
  | Whether the dimension has skylight access or not.
 
  | Whether the dimension has skylight access or not.
 
  | 1: true, 0: false.
 
  | 1: true, 0: false.
  |-
+
  |- style="background: #d4ecfc;"
 
  | has_ceiling
 
  | has_ceiling
  | TAG_Byte
+
  | [[NBT#Specification:byte_tag|Byte Tag]]
 
  | Whether the dimension has a bedrock ceiling or not. When true, causes lava to spread faster.
 
  | Whether the dimension has a bedrock ceiling or not. When true, causes lava to spread faster.
 
  | 1: true, 0: false.
 
  | 1: true, 0: false.
  |-
+
  |- style="background: #d4ecfc;"
 
  | ultrawarm
 
  | ultrawarm
  | TAG_Byte
+
  | [[NBT#Specification:byte_tag|Byte Tag]]
 
  | Whether the dimensions behaves like the nether (water evaporates and sponges dry) or not. Also causes lava to spread thinner.
 
  | Whether the dimensions behaves like the nether (water evaporates and sponges dry) or not. Also causes lava to spread thinner.
 
  | 1: true, 0: false.
 
  | 1: true, 0: false.
 
  |-
 
  |-
 
  | natural
 
  | natural
  | TAG_Byte
+
  | [[NBT#Specification:byte_tag|Byte Tag]]
 
  | When false, compasses spin randomly. When true, nether portals can spawn zombified piglins.
 
  | When false, compasses spin randomly. When true, nether portals can spawn zombified piglins.
 
  | 1: true, 0: false.
 
  | 1: true, 0: false.
  |-
+
  |- style="background: #d4ecfc;"
 
  | coordinate_scale
 
  | coordinate_scale
  | TAG_Double
+
  | [[NBT#Specification:double_tag|Double Tag]]
 
  | The multiplier applied to coordinates when traveling to the dimension.
 
  | The multiplier applied to coordinates when traveling to the dimension.
 
  | Allowed values vary between 1e-5 (0.00001) and 3e7 (30000000).
 
  | Allowed values vary between 1e-5 (0.00001) and 3e7 (30000000).
  |-
+
  |- style="background: #d4ecfc;"
 
  | bed_works
 
  | bed_works
  | TAG_Byte
+
  | [[NBT#Specification:byte_tag|Byte Tag]]
 
  | Whether players can use a bed to sleep.
 
  | Whether players can use a bed to sleep.
 
  | 1: true, 0: false.
 
  | 1: true, 0: false.
  |-
+
  |- style="background: #d4ecfc;"
 
  | respawn_anchor_works
 
  | respawn_anchor_works
  | TAG_Byte
+
  | [[NBT#Specification:byte_tag|Byte Tag]]
 
  | Whether players can charge and use respawn anchors.
 
  | Whether players can charge and use respawn anchors.
 
  | 1: true, 0: false.
 
  | 1: true, 0: false.
 
  |-
 
  |-
 
  | min_y
 
  | min_y
  | TAG_Int
+
  | [[NBT#Specification:int_tag|Int Tag]]
 
  | The minimum Y level.
 
  | The minimum Y level.
 
  | Allowed values vary between -2032 and 2031, and must also be a multiple of 16.
 
  | Allowed values vary between -2032 and 2031, and must also be a multiple of 16.
Line 588: Line 586:
 
  |-
 
  |-
 
  | height
 
  | height
  | TAG_Int
+
  | [[NBT#Specification:int_tag|Int Tag]]
 
  | The maximum height.
 
  | The maximum height.
 
  | Allowed values vary between 16 and 4064, and must also be a multiple of 16.
 
  | Allowed values vary between 16 and 4064, and must also be a multiple of 16.
 
{{warning|min_y + height cannot exceed 2032.}}
 
{{warning|min_y + height cannot exceed 2032.}}
  |-
+
  |- style="background: #d4ecfc;"
 
  | logical_height
 
  | logical_height
  | TAG_Int
+
  | [[NBT#Specification:int_tag|Int Tag]]
 
  | The maximum height to which chorus fruits and nether portals can bring players within this dimension. (Must be lower than height)
 
  | The maximum height to which chorus fruits and nether portals can bring players within this dimension. (Must be lower than height)
 
  | Allowed values vary between 0 and 4064, and must also be a multiple of 16.
 
  | Allowed values vary between 0 and 4064, and must also be a multiple of 16.
 
{{warning|logical_height cannot exceed the height.}}
 
{{warning|logical_height cannot exceed the height.}}
  |-
+
  |- style="background: #d4ecfc;"
 
  | infiniburn
 
  | infiniburn
  | TAG_String
+
  | [[NBT#Specification:string_tag|String Tag]]
 
  | A resource location defining what block tag to use for infiniburn.
 
  | A resource location defining what block tag to use for infiniburn.
 
  | "#" or minecraft resource "#minecraft:...".
 
  | "#" or minecraft resource "#minecraft:...".
 
  |-
 
  |-
 
  | effects
 
  | effects
  | TAG_String
+
  | [[NBT#Specification:string_tag|String Tag]]
 
  | Defines special dimensional effects, which includes:
 
  | Defines special dimensional effects, which includes:
 
* Cloud level: Height at which clouds appear, if at all.
 
* Cloud level: Height at which clouds appear, if at all.
Line 617: Line 615:
 
  |-
 
  |-
 
  | ambient_light
 
  | ambient_light
  | TAG_Float
+
  | [[NBT#Specification:float_tag|Float Tag]]
 
  | How much light the dimension has. Used as interpolation factor when calculating the brightness generated from sky light.
 
  | How much light the dimension has. Used as interpolation factor when calculating the brightness generated from sky light.
 
  | The default values are 0.0 and 0.1, 0.1 for the nether and 0.0 for the other dimensions.  
 
  | The default values are 0.0 and 0.1, 0.1 for the nether and 0.0 for the other dimensions.  
 
  |-
 
  |-
 
  | piglin_safe
 
  | piglin_safe
  | TAG_Byte
+
  | [[NBT#Specification:byte_tag|Byte Tag]]
 
  | Whether piglins shake and transform to zombified piglins.
 
  | Whether piglins shake and transform to zombified piglins.
 
  | 1: true, 0: false.
 
  | 1: true, 0: false.
  |-
+
  |- style="background: #d4ecfc;"
 
  | has_raids
 
  | has_raids
  | TAG_Byte
+
  | [[NBT#Specification:byte_tag|Byte Tag]]
 
  | Whether players with the Bad Omen effect can cause a raid.
 
  | Whether players with the Bad Omen effect can cause a raid.
 
  | 1: true, 0: false.
 
  | 1: true, 0: false.
  |-
+
  |- style="background: #d4ecfc;"
 
  | monster_spawn_light_level
 
  | monster_spawn_light_level
  | TAG_Int or TAG_Compound
+
  | [[NBT#Specification:int_tag|Int Tag]] or [[NBT#Specification:compound_tag|Compound Tag]]
 
  | During a monster spawn attempt, this is the maximum allowed light level for it to succeed. It can be either a fixed value, or one of several types of distributions.
 
  | During a monster spawn attempt, this is the maximum allowed light level for it to succeed. It can be either a fixed value, or one of several types of distributions.
 
  | Can be either:
 
  | Can be either:
* as a TAG_Int: Allowed values vary between 0 and 15.
+
* as a [[NBT#Specification:int_tag|Int Tag]]: Allowed values vary between 0 and 15.
* as a TAG_Compound: See [[#Integer distribution|Integer distribution]].
+
* as a [[NBT#Specification:compound_tag|Compound Tag]]: See [https://minecraft.wiki/w/Dimension_type here].
  |-
+
  |- style="background: #d4ecfc;"
 
  | monster_spawn_block_light_limit
 
  | monster_spawn_block_light_limit
  | TAG_Int
+
  | [[NBT#Specification:int_tag|Int Tag]]
 
  | Maximum allowed block light level monster spawn attempts to happen.
 
  | Maximum allowed block light level monster spawn attempts to happen.
 
  | Allowed values vary between 0 and 15.
 
  | Allowed values vary between 0 and 15.
Line 645: Line 643:
 
  |}
 
  |}
  
==== Integer distribution ====
+
== Wolf Variant ==
  
Integer providers can be either declared as constants with a TAG_Int, or in a structured TAG_Compounds for specific distribution types. For the latter, the following format is used.
+
The <code>minecraft:wolf_variant</code> registry. It defines the textures for different wolf variants.  
 
 
{{Need Info|The use for integer distributions described in the previous section pertains to monster spawning mechanisms, which is server-sided operation. The values received in the <code>monster_spawn_light_level</code> field have no noticeable impact on the client whatsoever. Should they even be described here?}}
 
  
 
{| class="wikitable"
 
{| class="wikitable"
 
  ! Name
 
  ! Name
 
  ! Type
 
  ! Type
  !style="width: 40%;" | Meaning
+
  ! Meaning
 
  ! Values
 
  ! Values
 
  |-
 
  |-
  | type
+
  | wild_texture
  | TAG_String
+
  | [[NBT#Specification:string_tag|String Tag]]
  | The type of distribution.
+
  | The texture for the wild version of this wolf.
| Can be either:
+
The Notchian client uses the corresponding asset located at <code>textures</code>.
* <code>minecraft:constant</code>, for constant values, similarly to when declared as a TAG_Int.
+
| Example: "minecraft:entity/wolf/wolf_ashen".
* <code>minectaft:uniform</code>, for uniformly distributed values between the specified range.
+
|-
* <code>minecraft:biased_to_bottom</code>, for values biased towards the lower end, between the specified range.
+
| tame_texture
* <code>minecraft:clamped</code>, for uniformly distributed values, clamped inside a range.
+
| [[NBT#Specification:string_tag|String Tag]]
* <code>minecraft:weighted_list</code>, for a weighted list of multiple distributions.
+
| The texture for the tamed version of this wolf.
* <code>minecraft:clamped_normal</code>, for normally distributed values, clamped inside a range.
+
The Notchian client uses the corresponding asset located at <code>textures</code>.
 +
| Example: "minecraft:entity/wolf/wolf_ashen_tame".
 
  |-
 
  |-
  | value
+
  | angry_texture
  | TAG_Compound
+
  | [[NBT#Specification:string_tag|String Tag]]
  | Extra data pertaining to the type of distribution.
+
  | The texture for the angry version of this wolf.
  | Depends on the type of distribution.
+
The Notchian client uses the corresponding asset located at <code>textures</code>.
 +
| Example: "minecraft:entity/wolf/wolf_ashen_angry".
 +
|- style="background: #d4ecfc;"
 +
| biomes
 +
| [[NBT#Specification:string_tag|String Tag]] or [[NBT#Specification:compound_tag|Compound Tag]]
 +
| Biomes in which this wolf can spawn in.
 +
  | See [https://minecraft.wiki/w/Wolf#Wolf_variants here].
 
  |}
 
  |}
  
== Default Registries ==
+
= Default Registries =
  
The default registries in the JSON format is available for the following versions:
+
The default content of the registries is available in the JSON format for the following versions:
* [https://pastebin.com/guryvw56 1.20.1]
+
* [https://gist.github.com/WinX64/ab8c7a8df797c273b32d3a3b66522906 1.20.6]
 +
* [https://gist.github.com/WinX64/3675ffee90360e9fc1e45074e49f6ede 1.20.2]
 +
* [https://gist.github.com/WinX64/2d257d3df3c7ab9c4b02dc90be881ab2 1.20.1]
 
* [https://gist.github.com/nikes/aff59b758a807858da131a1881525b14 1.19.2]
 
* [https://gist.github.com/nikes/aff59b758a807858da131a1881525b14 1.19.2]
 
* [https://gist.github.com/rj00a/f2970a8ce4d09477ec8f16003b9dce86 1.19]
 
* [https://gist.github.com/rj00a/f2970a8ce4d09477ec8f16003b9dce86 1.19]
 +
 +
[[Category:Protocol Details]]
 +
[[Category:Minecraft Modern]]

Latest revision as of 20:17, 14 June 2024

Registries are repositories of data that contain entries pertaining to certain aspects of the game, such as the world, the player, among others.

The ability for the server to send customized registries to the client was introduced in 1.16.3, which allows for a great deal of customization over certain features of the game.

Overview

The server sends these registries to the client via Registry Data packet during the configuration phase.

Packet ID State Bound To Field Name Field Type Notes
Varies Configuration Client
Registry ID Identifier
Entry Count VarInt Number of entries in the following array.
Entries Entry ID Array Identifier
Has Data Boolean Whether the entry has any data following.
Data NBT Entry data. Only present if Has Data is true.

The structure of the entries' data depends on the registry specified in the packet. The structure for each available registry is defined below.

Throughout the configuration phase, the server will send multiple Registry Data packets, each one pertaining to a different registry.

Client/Server Exchange

In order to save bandwidth, the server omits the data for entries pertaining to a data pack that is mutually supported by both the client and server. The exchange is as follows:

  1. SC: Clientbound Known Packs
  2. CS: Serverbound Known Packs
  3. Server computes the mutually supported data packs
  4. SC: Multiple Registry Data (excluding mutually supported data)


Warning.png The ordering in which the entries of a registry are sent defines the numeric ID that they will be assigned to. It is essential to maintain consistency between server and client, since many parts of the protocol reference these entries by their ID. The client will disconnect upon receiving a reference to a non-existing entry.

Available Registries

The current release specification allows for eight different registries to be sent to the client. A brief explanation of each of them is presented below, along with the format of their entries' element field.

Fields marked in __ blue represent data for server-side exclusive operations, and thus have no visible impact on the client.

Armor Trim Material

The minecraft:trim_material registry. It defines various visual properties of trim materials in armors.

Name Type Meaning Values
asset_name String Tag The trim color model to be rendered on top of the armor.

The Notchian client uses the corresponding asset located at trims/color_palettes.

Example: "minecraft:amethyst".
ingredient String Tag The ingredient used.

This has the visual effect of showing the trimmed armor model on the Smithing Table when the correct item is placed.

Example: "minecraft:copper_ingot".
item_model_index Float Tag Color index of the trim on the armor item when in the inventory. Default values vary between 0.1 and 1.0.
override_armor_materials Optional Compound Tag Asset for different types of armor materials, which overrides the value specified in the asset_name field.

The Notchian client uses this to give a darker color shade when a trim material is applied to armor of the same material, such as iron applied to iron armor.

The key can be either:
  • leather
  • chainmail
  • iron
  • gold
  • diamond
  • turtle
  • netherite

The value accepts the same values as asset_name.

description Compound Tag or String Tag The name of the trim material to be displayed on the armor tool-tip.

Any styling used in this component is also applied to the trim pattern description.

See Text formatting.

Armor Trim Pattern

The minecraft:trim_pattern registry. It defines various visual properties of trim patterns in armors.

Huh.png The following information needs to be added to this page:
The decal field seems to exist to prevent overlapping between the armor model and the trim model. What exact effect does it have?
Name Type Meaning Values
asset_id String Tag The trim pattern model to be rendered on top of the armor.

The Notchian client uses the corresponding asset located at trims/models/armor.

Example: "minecraft:coast".
template_item String Tag The template item used for this trim.

This has the visual effect of showing the trimmed armor model on the Smithing Table when the correct item is placed.

Example: "minecraft:coast_armor_trim_smithing_template".
description Compound Tag or String Tag The name of the trim pattern to be displayed on the armor tool-tip. See Text formatting.
decal Byte Tag Whether this trim is a decal. 1: true, 0: false.

The minecraft:banner_pattern registry. It defines the textures for different banner patterns.

Name Type Meaning Values
asset_id String Tag The texture of the pattern.

The Notchian client uses the corresponding asset located at textures/entity/banner or textures/entity/shield, depending on the case.

Example: "minecraft:diagonal_left".
translation_key String Tag The translation key representing the banner pattern, shown in the item's tooltip.

It is appended to the banner color when used, resulting in <translation_key>.<color>.

Example: "block.minecraft.banner.diagonal_left.blue", which translates to "Blue Per Bend Sinister".

Biome

The minecraft:worldgen/biome registry. It defines several aesthetic characteristics of the biomes present in the game.

Biome entries are referenced in the Chunk Biomes and Chunk Data and Update Light packets.

Name Type Meaning Values
has_precipitation Byte Tag Determines whether or not the biome has precipitation. 1: true, 0: false.
temperature Float Tag The temperature factor of the biome.

Affects foliage and grass color if they are not explicitly set.

The default values vary between -0.5 and 2.0.
temperature_modifier Optional String Tag Modifier that affects the resulting temperature. Can be either:
  • none, for a static temperature throughout the biome (aside from variations depending on the height).
  • frozen, for pockets of warm temperature (0.2) to be randomly distributed throughout the biome. This is used on frozen ocean variants in the Notchian client to simulate spots of unfrozen water, where it always rains instead of snowing.
downfall Float Tag The downfall factor of the biome.

Affects foliage and grass color if they are not explicitly set.

The default values vary between 0.0 and 1.0.
effects Compound Tag Biome special effects. See Effects.

Effects

Name Type Meaning Values
fog_color Int Tag The color of the fog effect when looking past the view distance. Example: 8364543, which is #7FA1FF in RGB.
water_color Int Tag The tint color of the water blocks. Example: 8364543, which is #7FA1FF in RGB.
water_fog_color Int Tag The color of the fog effect when looking past the view distance when underwater. Example: 8364543, which is #7FA1FF in RGB.
sky_color Int Tag The color of the sky. Example: 8364543, which is #7FA1FF in RGB.
foliage_color Optional Int Tag The tint color of leaves.

If not specified, the foliage color is calculated based on biome temperature and downfall.

Example: 8364543, which is #7FA1FF in RGB.
grass_color Optional Int Tag The tint color of the grass.

If not specified, the grass color is calculated based on biome temperature and downfall.

Example: 8364543, which is #7FA1FF in RGB.
grass_color_modifier Optional String Tag Modifier that affects the resulting grass color. Can be either:
  • none, for a static grass color throughout the biome.
  • dark_forest, for a darker, and less saturated shade of the color.
  • swamp, for overriding it with two fixed colors (#4C763C and #6A7039), randomly distributed throughout the biome.
particle Optional Compound Tag Ambient visual particles. See Particle.
ambient_sound Optional String Tag or Compound Tag Ambient soundtrack that starts playing when entering the biome, and fades out when exiting it. Can be either:
mood_sound Optional Compound Tag Additional ambient sound that plays in moody situations. Moodiness increases when blocks around the player are at both sky and block light level zero, and decreases otherwise.

The moodiness calculation happens once per tick, and after reaching a certain value, the ambient mood sound is played.

See Mood sound.
additions_sound Optional Compound Tag Additional ambient sound that has a chance of playing randomly every tick. See Additions sound.
music Optional Compound Tag Music properties for the biome. See Music.

Particle

Name Type Meaning Values
options Compound Tag Particle type and related options. See Particle options.
probability Float Tag The chance for the particle to be spawned. Ambient particles are attempted to be spawned multiple times every tick. The default values vary between 0.0 and 1.0.

Particle options

Huh.png The following information needs to be added to this page:
The extra data specified in the Particle definitions is missing information to allow the particle to be successfully serialized as NBT.
Is it here the best place to define them, or somewhere else?
Name Type Meaning Values
type String Tag The name of the particle. See protocol particle data.
value Optional Varies Any necessary extra data to fully define the particle. See protocol particle data.

Ambient sound

Name Type Meaning Values
sound_id String Tag The ID of a soundtrack Example: "minecraft:ambient.basalt_deltas.loop"
range Optional Float Tag The range of the sound. If not specified, the volume is used to calculate the effective range.

Mood sound

Name Type Meaning Values
sound String Tag The ID of a soundtrack. Example: "minecraft:ambient.basalt_deltas.mood"
tick_delay Int Tag Defines the rate at which the moodiness increase, and also the minimum time between plays. The default value is always 6000.
block_search_extent Int Tag The radius used for the block search around the player during moodiness calculation. The default value is always 8.
offset Double Tag The distance offset from the player when playing the sound.

The sound plays in the direction of the selected block during moodiness calculation, and is magnified by the offset.

The default value is always 2.0.

Additions sound

Name Type Meaning Values
sound String Tag The ID of a soundtrack. Example: "minecraft:ambient.basalt_deltas.additions"
tick_chance Double Tag The chance of the sound playing during the tick. The default value is always 0.0111.

Music

Name Type Meaning Values
sound String Tag The ID of a soundtrack. Example: "minecraft:music.nether.basalt_deltas"
min_delay Int Tag The minimum time in ticks since the last music finished for this music to be able to play. The default value is always 12000.
max_delay Int Tag The maximum time in ticks since the last music finished for this music to be able to play. The default value is always 24000.
replace_current_music Byte Tag Whether this music can replace the current one. 1: true, 0: false.

Chat Type

The minecraft:chat_type registry. It defines the different types of in-game chat and how they're formatted.

Chat type entries are referenced in the Disguised Chat Message and Player Chat Message packets.

Name Type Meaning Values
chat Compound Tag The chat decoration. See Decoration.
narration Compound Tag The narration decoration. See Decoration.

Decoration

Name Type Meaning Values
translation_key String Tag The translation key representing the chat format. It can also be a formatting string directly. Example: "chat.type.text", which translates to "<%s> %s".
style Optional Compound Tag Optional styling to be applied on the final message.

Not present in the narration decoration.

See Text formatting#Styling fields.
parameters List Tag of String Tag Placeholders used when formatting the string given by the translation_key field. Can be either:
  • sender, for the name of the player sending the message.
  • target, for the name of the player receiving the message, which may be empty.
  • content, for the actual message.

Damage Type

The minecraft:damage_type registry. It defines the different types of damage an entity can sustain.

Damage type entries are referenced in the Damage Event packet.

Name Type Meaning Values
message_id String Tag Id of the death message. The full message is displayed as death.attack.<message_id>. Example: "onFire".
scaling String Tag Whether the damage taken scales with the difficulty. Can be either:
  • never
  • when_caused_by_living_non_player
  • always
exhaustion Float Tag The amount of exhaustion caused when suffering this type of damage. Default values are either 0.0 or 0.1.
effects Optional String Tag Effect played when the player suffers this damage, including the sound that is played. Can be either:
  • hurt
  • thorns
  • drowning
  • burning
  • poking
  • freezing
death_message_type Optional String Tag Defines how the death message is constructed. Can be either:
  • default, for the message to be built normally.
  • fall_variants, for the most significant fall damage to be considered.
  • intentional_game_design, for MCPE-28723 to be considered as an argument when translating the message.

Dimension Type

The minecraft:dimension_type registry. It defines the types of dimension that can be attributed to a world, along with all their characteristics.

Dimension type entries are referenced in the Login (play) and Respawn packets.

Name Type Meaning Values
fixed_time Optional Long Tag If set, the time of the day fixed to the specified value. Allowed values vary between 0 and 24000.
has_skylight Byte Tag Whether the dimension has skylight access or not. 1: true, 0: false.
has_ceiling Byte Tag Whether the dimension has a bedrock ceiling or not. When true, causes lava to spread faster. 1: true, 0: false.
ultrawarm Byte Tag Whether the dimensions behaves like the nether (water evaporates and sponges dry) or not. Also causes lava to spread thinner. 1: true, 0: false.
natural Byte Tag When false, compasses spin randomly. When true, nether portals can spawn zombified piglins. 1: true, 0: false.
coordinate_scale Double Tag The multiplier applied to coordinates when traveling to the dimension. Allowed values vary between 1e-5 (0.00001) and 3e7 (30000000).
bed_works Byte Tag Whether players can use a bed to sleep. 1: true, 0: false.
respawn_anchor_works Byte Tag Whether players can charge and use respawn anchors. 1: true, 0: false.
min_y Int Tag The minimum Y level. Allowed values vary between -2032 and 2031, and must also be a multiple of 16.

Warning.png min_y + height cannot exceed 2032.

height Int Tag The maximum height. Allowed values vary between 16 and 4064, and must also be a multiple of 16.

Warning.png min_y + height cannot exceed 2032.

logical_height Int Tag The maximum height to which chorus fruits and nether portals can bring players within this dimension. (Must be lower than height) Allowed values vary between 0 and 4064, and must also be a multiple of 16.

Warning.png logical_height cannot exceed the height.

infiniburn String Tag A resource location defining what block tag to use for infiniburn. "#" or minecraft resource "#minecraft:...".
effects String Tag Defines special dimensional effects, which includes:
  • Cloud level: Height at which clouds appear, if at all.
  • Sky type: Whether it's the normal sky with sun and moon; the low-visibility, foggy sky of the nether; or the static sky of the end.
  • Forced light map: Whether a bright light map is forced, siimilar to the night vision effect.
  • Constant ambient light: Whether blocks have shade on their faces.
Can be either:
  • minecraft:overworld, for clouds at 192, normal sky type, normal light map and normal ambient light.
  • minecraft:the_nether, for no clouds, nether sky type, normal light map and constant ambient light.
  • minecraft:the_end, for no clouds, end sky type, forced light map and normal ambient light.
ambient_light Float Tag How much light the dimension has. Used as interpolation factor when calculating the brightness generated from sky light. The default values are 0.0 and 0.1, 0.1 for the nether and 0.0 for the other dimensions.
piglin_safe Byte Tag Whether piglins shake and transform to zombified piglins. 1: true, 0: false.
has_raids Byte Tag Whether players with the Bad Omen effect can cause a raid. 1: true, 0: false.
monster_spawn_light_level Int Tag or Compound Tag During a monster spawn attempt, this is the maximum allowed light level for it to succeed. It can be either a fixed value, or one of several types of distributions. Can be either:
monster_spawn_block_light_limit Int Tag Maximum allowed block light level monster spawn attempts to happen. Allowed values vary between 0 and 15.

The default values are 0 and 15, 15 for the nether (where monsters can spawn anywhere) and 0 for other dimensions (where monsters can only spawn naturally in complete darkness).

Wolf Variant

The minecraft:wolf_variant registry. It defines the textures for different wolf variants.

Name Type Meaning Values
wild_texture String Tag The texture for the wild version of this wolf.

The Notchian client uses the corresponding asset located at textures.

Example: "minecraft:entity/wolf/wolf_ashen".
tame_texture String Tag The texture for the tamed version of this wolf.

The Notchian client uses the corresponding asset located at textures.

Example: "minecraft:entity/wolf/wolf_ashen_tame".
angry_texture String Tag The texture for the angry version of this wolf.

The Notchian client uses the corresponding asset located at textures.

Example: "minecraft:entity/wolf/wolf_ashen_angry".
biomes String Tag or Compound Tag Biomes in which this wolf can spawn in. See here.

Default Registries

The default content of the registries is available in the JSON format for the following versions: