Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Identifier: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Sync: updated from Minecraft
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
Line 118: Line 118:


=== Registries and registry objects ===
=== Registries and registry objects ===
{{update|section=1|Lots of tags seem missing, see [[Minecraft::zh:注册表]] for reference to add here if you speak Chinese}}
<div class="treeview">
<div class="treeview">


Line 124: Line 123:


* {{File|directory|minecraft:root|inline=1}}: Root registry.
* {{File|directory|minecraft:root|inline=1}}: Root registry.
** {{File|file|minecraft:activity|inline=1}}: Entity schedule activities.
** {{File|file|minecraft:attribute|inline=1}}: Attributes.
** {{File|file|minecraft:attribute|inline=1}}: Attributes.
** {{File|file|minecraft:attribute_type|inline=1}}: Attribute types.
** {{File|file|minecraft:block|inline=1}}: Blocks.
** {{File|file|minecraft:block|inline=1}}: Blocks.
** {{File|file|minecraft:block_entity_type|inline=1}}: Block entity types.
** {{File|file|minecraft:block_entity_type|inline=1}}: Block entity types.
** {{File|file|minecraft:chunk_status|inline=1}}: Chunk status.
** {{File|file|minecraft:block_predicate_type|inline=1}}: Block predicate types.
** {{File|file|minecraft:chat_type|inline=1}}: Chat types.
** {{File|file|minecraft:chunk_generator|inline=1}}: Chunk generators.
** {{File|file|minecraft:chunk_status|inline=1}}: Chunk statuses.
** {{File|file|minecraft:command_argument_type|inline=1}}: Command argument types.
** {{File|file|minecraft:command_argument_type|inline=1}}: Command argument types.
** {{File|file|minecraft:custom_stat|inline=1}}: Custom Statistics.
** {{File|file|minecraft:consume_effect_type|inline=1}}: Consume effect types.
** {{File|file|minecraft:dimension|inline=1}}<span style="color:#d33">*</span>: Dimensions and level stems.
** {{File|file|minecraft:creative_mode_tab|inline=1}}: Creative mode tabs.
** {{File|file|minecraft:custom_stat|inline=1}}: Custom statistics.
** {{File|file|minecraft:data_component_predicate_type|inline=1}}: Data component predicate types.
** {{File|file|minecraft:data_component_type|inline=1}}: Data component types.
** {{File|file|minecraft:damage_type|inline=1}}<span style="color:#d33">*</span>: Damage types.
** {{File|file|minecraft:debug_subscription|inline=1}}: Debug subscriptions.
** {{File|file|minecraft:dialog_type|inline=1}}: Dialog types.
** {{File|file|minecraft:dialog_action_type|inline=1}}: Dialog action types.
** {{File|file|minecraft:dialog_body_type|inline=1}}: Dialog body types.
** {{File|file|minecraft:dimension|inline=1}}<span style="color:#d33">*</span>: Dimensions.
** {{File|file|minecraft:dimension_type|inline=1}}<span style="color:#d33">*</span>: Dimension types.
** {{File|file|minecraft:dimension_type|inline=1}}<span style="color:#d33">*</span>: Dimension types.
** {{File|file|minecraft:enchantment|inline=1}}<span style="color:#d33">*</span>: Enchantments.
** {{File|file|minecraft:enchantment|inline=1}}<span style="color:#d33">*</span>: Enchantments.
** {{File|file|minecraft:enchantment_effect_component_type|inline=1}}: Enchantment effect component types.
** {{File|file|minecraft:enchantment_entity_effect_type|inline=1}}: Enchantment entity effect types.
** {{File|file|minecraft:enchantment_level_based_value_type|inline=1}}: Enchantment level-based value types.
** {{File|file|minecraft:enchantment_location_based_effect_type|inline=1}}: Enchantment location-based effect types.
** {{File|file|minecraft:enchantment_provider|inline=1}}<span style="color:#d33">*</span>: Enchantment providers.
** {{File|file|minecraft:enchantment_provider_type|inline=1}}: Enchantment provider types.
** {{File|file|minecraft:enchantment_value_effect_type|inline=1}}: Enchantment value effect types.
** {{File|file|minecraft:entity_sub_predicate_type|inline=1}}: Entity subpredicate types.
** {{File|file|minecraft:entity_type|inline=1}}: Entity types.
** {{File|file|minecraft:entity_type|inline=1}}: Entity types.
** {{File|file|minecraft:environment_attribute|inline=1}}: Environment attributes.
** {{File|file|minecraft:float_provider_type|inline=1}}: Float provider types.
** {{File|file|minecraft:fluid|inline=1}}: Fluids.
** {{File|file|minecraft:fluid|inline=1}}: Fluids.
** {{File|file|minecraft:game_event|inline=1}}: Game events.
** {{File|file|minecraft:game_event|inline=1}}: Game events.
** {{File|file|minecraft:game_rule|inline=1}}: Game rules.
** {{File|file|minecraft:height_provider_type|inline=1}}: Height provider types.
** {{File|file|minecraft:input_control_type|inline=1}}: Input control types.
** {{File|file|minecraft:int_provider_type|inline=1}}: Int provider types.
** {{File|file|minecraft:item|inline=1}}: Items.
** {{File|file|minecraft:item|inline=1}}: Items.
** {{File|file|minecraft:menu|inline=1}}<span style="color:#d33">*</span>: Menu types.
** {{File|file|minecraft:item_modifier|inline=1}}: Item modifiers.
** {{File|file|minecraft:jukebox_song|inline=1}}<span style="color:#d33">*</span>: Jukebox songs.
** {{File|file|minecraft:loot_condition_type|inline=1}}: Loot condition types.
** {{File|file|minecraft:loot_function_type|inline=1}}: Loot function types.
** {{File|file|minecraft:loot_nbt_provider_type|inline=1}}: Loot NBT provider types.
** {{File|file|minecraft:loot_number_provider_type|inline=1}}: Loot number provider types.
** {{File|file|minecraft:loot_pool_entry_type|inline=1}}: Loot pool entry types.
** {{File|file|minecraft:loot_score_provider_type|inline=1}}: Loot score provider types.
** {{File|file|minecraft:loot_table|inline=1}}: Loot tables.
** {{File|file|minecraft:map_decoration_type|inline=1}}: Map decoration types.
** {{File|file|minecraft:memory_module_type|inline=1}}: Entity memory module types.
** {{File|file|minecraft:menu|inline=1}}: Menu types.
** {{File|file|minecraft:mob_effect|inline=1}}: Mob effects.
** {{File|file|minecraft:mob_effect|inline=1}}: Mob effects.
** {{File|file|minecraft:number_format_type|inline=1}}: Number format types.
** {{File|file|minecraft:number_provider|inline=1}}: Number providers.
** {{File|file|minecraft:painting_variant|inline=1}}<span style="color:#d33">*</span>: Painting variants.
** {{File|file|minecraft:particle_type|inline=1}}: Particle types.
** {{File|file|minecraft:particle_type|inline=1}}: Particle types.
** {{File|file|minecraft:position_source_type|inline=1}}: Position source types (used by game events).
** {{File|file|minecraft:permission_type|inline=1}}: Permission types.
** {{File|file|minecraft:permission_check_type|inline=1}}: Permission check types.
** {{File|file|minecraft:potion|inline=1}}: Potions.
** {{File|file|minecraft:potion|inline=1}}: Potions.
** {{File|file|minecraft:point_of_interest_type|inline=1}}: Point of interest types.
** {{File|file|minecraft:pool_alias_binding|inline=1}}: Pool alias binding types.
** {{File|file|minecraft:position_source_type|inline=1}}: Position source types.
** {{File|file|minecraft:pos_rule_test|inline=1}}: Structure feature position rule test types.
** {{File|file|minecraft:predicate|inline=1}}: Predicates.
** {{File|file|minecraft:recipe|inline=1}}: Recipes.
** {{File|file|minecraft:recipe_book_category|inline=1}}: Recipe book categories.
** {{File|file|minecraft:recipe_display|inline=1}}: Recipe displays.
** {{File|file|minecraft:recipe_serializer|inline=1}}: Recipe serializers.
** {{File|file|minecraft:recipe_serializer|inline=1}}: Recipe serializers.
** {{File|file|minecraft:recipe_type|inline=1}}: Recipe types.
** {{File|file|minecraft:recipe_type|inline=1}}: Recipe types.
** {{File|file|minecraft:root|inline=1}}: Root registry.
** {{File|file|minecraft:rule_block_entity_modifier|inline=1}}: Rule block entity modifier types.
** {{File|file|minecraft:rule_test|inline=1}}: Structure feature rule test types.
** {{File|file|minecraft:sensor_type|inline=1}}: Entity AI sensor types.
** {{File|file|minecraft:slot_display|inline=1}}: Slot displays.
** {{File|file|minecraft:slot_source_type|inline=1}}: Slot source types.
** {{File|file|minecraft:slot_source|inline=1}}: Slot sources.
** {{File|file|minecraft:sound_event|inline=1}}: Sound events.
** {{File|file|minecraft:sound_event|inline=1}}: Sound events.
** {{File|file|minecraft:spawn_condition_type|inline=1}}: Spawn condition types.
** {{File|file|minecraft:stat_type|inline=1}}: Statistics types.
** {{File|file|minecraft:stat_type|inline=1}}: Statistics types.
** {{File|file|minecraft:structure_piece|inline=1}}: Structure piece types.
** {{File|file|minecraft:structure_placement|inline=1}}: Structure placement types.
** {{File|file|minecraft:structure_pool_element|inline=1}}: Structure pool element types.
** {{File|file|minecraft:structure_processor|inline=1}}: Structure processor types.
** {{File|file|minecraft:structure_set|inline=1}}<span style="color:#d33">*</span>: Structure sets.
** {{File|file|minecraft:structure_type|inline=1}}: Structure types.
** {{File|file|minecraft:test_environment|inline=1}}: Game test environments.
** {{File|file|minecraft:test_environment_definition_type|inline=1}}: Game test environment definition types.
** {{File|file|minecraft:test_function|inline=1}}: Game test functions.
** {{File|file|minecraft:test_instance|inline=1}}: Game test instances.
** {{File|file|minecraft:test_instance_type|inline=1}}: Game test instance types.
** {{File|file|minecraft:ticket_type|inline=1}}: Ticket types.
** {{File|file|minecraft:timeline|inline=1}}: Timelines for world clocks.
** {{File|file|minecraft:timeline|inline=1}}: Timelines for world clocks.
** {{File|file|minecraft:world_clock|inline=1}}: [[Minecraft:World clock]]s.
** {{File|file|minecraft:trade_set|inline=1}}<span style="color:#d33">*</span>: Trade sets.
** {{File|directory|inline=1}} Entity data registries:
** {{File|file|minecraft:trial_spawner|inline=1}}: Trial spawner configurations.
*** {{File|file|minecraft:activity|inline=1}}: Entity schedule activitys.
** {{File|file|minecraft:trigger_type|inline=1}}: Advancement criterion trigger types.
*** {{File|file|minecraft:memory_module_type|inline=1}}: Entity memory module types.
** {{File|file|minecraft:trim_material|inline=1}}<span style="color:#d33">*</span>: Armor trim materials.
*** {{File|file|minecraft:motive|inline=1}}<span style="color:#d33">*</span>: Painting motives.
** {{File|file|minecraft:trim_pattern|inline=1}}<span style="color:#d33">*</span>: Armor trim patterns.
*** {{File|file|minecraft:point_of_interest_type|inline=1}}: Poi types.
** {{File|file|minecraft:villager_profession|inline=1}}: Villager professions.
*** {{File|file|minecraft:schedule|inline=1}}: Entity schedules.
** {{File|file|minecraft:villager_trade|inline=1}}<span style="color:#d33">*</span>: Villager trade definitions.
*** {{File|file|minecraft:sensor_type|inline=1}}: Entity AI sensor types.
** {{File|file|minecraft:villager_type|inline=1}}: Villager types.
*** {{File|file|minecraft:villager_profession|inline=1}}: Villager professions.
** {{File|file|minecraft:world_clock|inline=1}}<span style="color:#d33">*</span>: [[Minecraft:World clock]]s.
*** {{File|file|minecraft:villager_trade|inline=1}}: [[Minecraft:Villager trade definition]].
** {{File|file|minecraft:worldgen/biome|inline=1}}<span style="color:#d33">*</span>: Biomes.
*** {{File|file|minecraft:villager_type|inline=1}}: Villager types.
** {{File|file|minecraft:worldgen/biome_source|inline=1}}: Biome sources.
** {{File|directory|inline=1}} Loot table serializers:
** {{File|file|minecraft:worldgen/block_state_provider_type|inline=1}}: Block state provider types.
*** {{File|file|minecraft:loot_condition_type|inline=1}}: Loot condition types.
** {{File|file|minecraft:worldgen/carver|inline=1}}: World carvers.
*** {{File|file|minecraft:loot_function_type|inline=1}}: Loot function types.
** {{File|file|minecraft:worldgen/carver_type|inline=1}}: World carver types.
*** {{File|file|minecraft:loot_nbt_provider_type|inline=1}}: Loot nbt provider types.
** {{File|file|minecraft:worldgen/chunk_generator|inline=1}}: Chunk generators.
*** {{File|file|minecraft:loot_number_provider_type|inline=1}}: Loot number provider types.
** {{File|file|minecraft:worldgen/density_function|inline=1}}: Density functions.
*** {{File|file|minecraft:loot_pool_entry_type|inline=1}}: Loot pool entry types.
** {{File|file|minecraft:worldgen/density_function_type|inline=1}}: Density function types.
*** {{File|file|minecraft:loot_score_provider_type|inline=1}}: Loot score provider types.
** {{File|file|minecraft:worldgen/feature|inline=1}}: Features.
** {{File|directory|inline=1}} JSON file value providers:
** {{File|file|minecraft:worldgen/feature_size_type|inline=1}}: Feature size types.
*** {{File|file|minecraft:float_provider_type|inline=1}}: Float provider types.
** {{File|file|minecraft:worldgen/feature_type|inline=1}}: Feature types.
*** {{File|file|minecraft:height_provider_type|inline=1}}: Height provider types.
** {{File|file|minecraft:worldgen/flat_level_generator_preset|inline=1}}<span style="color:#d33">*</span>: Flat world generator presets.
*** {{File|file|minecraft:int_provider_type|inline=1}}: Int provider types.
** {{File|file|minecraft:worldgen/foliage_placer_type|inline=1}}: Foliage placer types.
** {{File|directory|inline=1}} World generator registries:
** {{File|file|minecraft:worldgen/material_condition|inline=1}}: Surface condition sources.
*** {{File|file|minecraft:block_predicate_type|inline=1}}: Block predicate types.
** {{File|file|minecraft:worldgen/material_condition_type|inline=1}}: Surface condition source types.
*** {{File|file|minecraft:pos_rule_test|inline=1}}: Structure feature position rule test types.
** {{File|file|minecraft:worldgen/material_rule|inline=1}}: Surface rule sources.
*** {{File|file|minecraft:rule_test|inline=1}}: Structure feature rule test types.
** {{File|file|minecraft:worldgen/material_rule_type|inline=1}}: Surface rule source types.
*** {{File|file|minecraft:worldgen/biome|inline=1}}<span style="color:#d33">*</span>: Biomes.
** {{File|file|minecraft:worldgen/multi_noise_biome_source_parameter_list|inline=1}}<span style="color:#d33">*</span>: Multi-noise biome source parameter lists.
*** {{File|file|minecraft:worldgen/biome_source|inline=1}}: Biome sources.
** {{File|file|minecraft:worldgen/noise|inline=1}}<span style="color:#d33">*</span>: Normal noise.
*** {{File|file|minecraft:worldgen/block_state_provider_type|inline=1}}: Block state provider types.
** {{File|file|minecraft:worldgen/noise_settings|inline=1}}<span style="color:#d33">*</span>: Noise generator settings.
*** {{File|file|minecraft:worldgen/carver|inline=1}}: World carvers.
** {{File|file|minecraft:worldgen/placed_feature|inline=1}}<span style="color:#d33">*</span>: Placed features.
*** {{File|file|minecraft:worldgen/chunk_generator|inline=1}}: Chunk generators.
** {{File|file|minecraft:worldgen/placement_modifier_type|inline=1}}: Placement modifier types.
*** {{File|file|minecraft:worldgen/configured_carver|inline=1}}<span style="color:#d33">*</span>: Configured world carvers.
** {{File|file|minecraft:worldgen/pool_alias_binding|inline=1}}: Pool alias binding types.
*** {{File|file|minecraft:worldgen/configured_feature|inline=1}}<span style="color:#d33">*</span>: Configured features.
** {{File|file|minecraft:worldgen/processor_list|inline=1}}<span style="color:#d33">*</span>: Structure processor lists.
*** {{File|file|minecraft:worldgen/density_function|inline=1}}: Density functions.
** {{File|file|minecraft:worldgen/root_placer_type|inline=1}}: Root placer types.
*** {{File|file|minecraft:worldgen/density_function_type|inline=1}}: Density function types.
** {{File|file|minecraft:worldgen/structure|inline=1}}<span style="color:#d33">*</span>: Configured structures.
*** {{File|file|minecraft:worldgen/feature|inline=1}}: Features.
** {{File|file|minecraft:worldgen/structure_piece|inline=1}}: Structure piece types.
*** {{File|file|minecraft:worldgen/feature_size_type|inline=1}}: Feature size types.
** {{File|file|minecraft:worldgen/structure_placement|inline=1}}: Structure placement types.
*** {{File|file|minecraft:worldgen/flat_level_generator_preset|inline=1}}: Flat world generator presets.
** {{File|file|minecraft:worldgen/structure_pool_element|inline=1}}: Structure pool element types.
*** {{File|file|minecraft:worldgen/foliage_placer_type|inline=1}}: Foliage placer types.
** {{File|file|minecraft:worldgen/structure_processor|inline=1}}: Structure processor types.
*** {{File|file|minecraft:worldgen/material_condition|inline=1}}: Surface condition sources.
** {{File|file|minecraft:worldgen/structure_set|inline=1}}<span style="color:#d33">*</span>: Structure sets.
*** {{File|file|minecraft:worldgen/material_rule|inline=1}}: Surface rule sources.
** {{File|file|minecraft:worldgen/structure_type|inline=1}}: Structure types.
*** {{File|file|minecraft:worldgen/noise|inline=1}}<span style="color:#d33">*</span>: Normal noise.
** {{File|file|minecraft:worldgen/template_pool|inline=1}}<span style="color:#d33">*</span>: Structure template pools.
*** {{File|file|minecraft:worldgen/noise_settings|inline=1}}<span style="color:#d33">*</span>: Noise generator settings.
** {{File|file|minecraft:worldgen/tree_decorator_type|inline=1}}: Tree decorator types.
*** {{File|file|minecraft:worldgen/placed_feature|inline=1}}<span style="color:#d33">*</span>: Placed features.
** {{File|file|minecraft:worldgen/trunk_placer_type|inline=1}}: Trunk placer types.
*** {{File|file|minecraft:worldgen/placement_modifier_type|inline=1}}: Placement modifier types.
** {{File|file|minecraft:worldgen/world_preset|inline=1}}<span style="color:#d33">*</span>: World presets.
*** {{File|file|minecraft:worldgen/processor_list|inline=1}}<span style="color:#d33">*</span>: Structure processor lists.
*** {{File|file|minecraft:worldgen/structure|inline=1}}<span style="color:#d33">*</span>: Configured structure features.
*** {{File|file|minecraft:worldgen/structure_piece|inline=1}}: Structure piece types.
*** {{File|file|minecraft:worldgen/structure_placement|inline=1}}: Structure placement types.
*** {{File|file|minecraft:worldgen/structure_pool_element|inline=1}}: Structure pool element types.
*** {{File|file|minecraft:worldgen/structure_processor|inline=1}}: Structure processor types.
*** {{File|file|minecraft:worldgen/structure_set|inline=1}}: Structure sets.
*** {{File|file|minecraft:worldgen/structure_type|inline=1}}: Structure features.
*** {{File|file|minecraft:worldgen/template_pool|inline=1}}<span style="color:#d33">*</span>: Structure template pools.
*** {{File|file|minecraft:worldgen/tree_decorator_type|inline=1}}: Tree decorator types.
*** {{File|file|minecraft:worldgen/trunk_placer_type|inline=1}}: Trunk placer types.
*** {{File|file|minecraft:worldgen/world_preset|inline=1}}: World presets.


</div>
</div>

Latest revision as of 11:13, 17 August 2026

Identifiers (also known as resource locations, namespaced IDs, namespaced identifiers, resource identifiers,<ref>Template:Snap</ref> or namespaced strings<ref>DataFixerUpper/NamespacedStringType.java at 8b5f82ab78b30ff5813b3a7f3906cd3f4f732acf · Mojang/DataFixerUpper – GitHub</ref>) are a way to declare and specify game objects in Minecraft, which can identify built-in and user-defined objects without potential ambiguity or conflicts.

Introduction

Identifiers are used as plain strings to reference Minecraft:blocks, Minecraft:items, entity types, and various other objects in vanilla Minecraft.

A valid identifier has a format of namespace:path, where only certain characters can be used.

Legal characters

Java Edition

The namespace and the path of an identifier should only contain the following symbols:

  • 0123456789 Numbers
  • abcdefghijklmnopqrstuvwxyz Lowercase letters
  • _ Underscore
  • - Hyphen/minus
  • . Dot

The following characters are illegal in the namespace, but acceptable in the path:

  • / Forward slash (directory separator)

The preferred naming convention for either namespace or path is snake_case.

.. is not a valid namespace.

Bedrock Edition

The namespace and the path of a namespaced ID can contain all symbols with the exception of slashes and colons.

The following characters are illegal in the namespace, but acceptable in the path of loot tables and functions.

  • / Forward slash (directory separator)

The preferred naming convention for either namespace or path is snake_case.

Conversion to string

An identifier is converted to a string by concatenating its namespace with a : (colon) and its path.

Examples:

Namespace Path String representation
minecraft diamond minecraft:diamond
foo bar.baz foo:bar.baz
minecraftwiki commands/minecraft_wiki minecraftwiki:commands/minecraft_wiki

Conversion from string

All identifiers can be converted to strings; however, not all strings can be converted to identifiers.

For a string to be converted, it must follow these restrictions:

  • The string may have at most one : (colon) character
  • The rest of the string must fulfill the requirement for legal characters. This includes disallowing / (forward slash) characters before the :, if a : is present

When the : is present, the part of the string before the : becomes the namespace, and the part of the string after the : becomes the path.

Template:IN, and in some cases Template:In, when the : is absent, minecraft becomes the namespace and the whole string becomes the path.

It is recommended to always include a : in the string format of identifiers.

Examples
String Resolved namespace Resolved path What the game converts it back to
bar:code bar code bar:code
minecraft:zombie minecraft zombie minecraft:zombie
diamond diamond
:dirt minecraft dirt minecraft:dirtTemplate:Needs testing
minecraft: minecraft None minecraft:Template:Needs testing
: minecraft None minecraft:Template:Needs testing
Empty String minecraft None minecraft:Template:Needs testing
foo/bar:coal Invalid character /
minecraft/villager minecraft/villager
mymap:schrödingers_var mymap mymap:schrödingers_varTemplate:Only
custom_pack:Capital custom_pack custom_pack:CapitalTemplate:Only

Java Edition usage

Template:Wip

Template:IN, identifiers act mainly as main keys of objects in registries or file paths of contents in Minecraft:data packs and Minecraft:resource packs. Some non-customizable contents also use identifiers to identify them.

Registries and registry objects

All registries and objects therein have identifiers to represent them. At the root of all registries is a registry with the identifier of Template:Cd into which all other registries are registered. Most registries are intended only for use internally by the game and by extension by Minecraft:mods, but some dynamic registries can have content added to them through Minecraft:data packs, marked in the list below with an asterisk (*).

Pack contents

Identifiers are also used to represent file paths in Minecraft:data packs or Minecraft:resource packs.

Data pack
  • Tags
  • Advancements
  • Recipes
  • Predicates
  • Loot tables
  • Item modifier
  • Functions
  • Structure files
  • Dimensions
  • Dimension types
  • World generator contents
    • Biomes
    • Configured carvers
    • Configured features
    • Configured structure features
    • Placed features
    • Structures
    • Structure sets
    • Processor lists
    • Template pools
    • Noise
    • Noise generator settings
    • Density functions
    • Flat level generator presets
    • World presets
Resource pack
  • Block state model definitions
  • Models
  • Textures
  • Sounds
  • Fonts
  • Font resource files
  • Particles
  • Shaders

Locating contents in packs

Given that objects in resource packs and data packs are files, the identifiers are constructed from their path relative to the Template:Cd or Template:Cd folder.

Though the locations vary by object type and the pack type the object type belongs to, there is a pattern to follow. In general, the location is in the fashion of pack_type/namespace/object_type/name.suffix, where all the / (forward slash) symbol (may be part of object_type or name) is replaced by operating system-dependent directory separator.

Given the type of content we want to locate, we can find out the corresponding Template:Cd, Template:Cd, and Template:Cd. Then, we can substitute in and find out the final file location of the content.

Registered pack contents

A registried pack content refers to pack content that is registered into a registry when the pack is loaded. For a registried pack content, its identifier works as both main key of registry entry and path of its resource file.

Other contents

Customizable contents
  • Boss bars
  • Command storages
Hardcoded contents
  • Cat types for predicates (e.g. textures/entity/cat/tabby.png, textures/entity/cat/jellie.png)
  • Criteria triggers
  • Item properties (i.e. item predicates in models. e.g. angle, custom_model_data)
  • Loot context param sets (i.e. types of loot table. e.g. barter, generic)
  • Unaccessible contents:
    • Suggestion providers for autocompletion of commands (e.g. summonable_entities, all_recipes)
    • Entity models
    • Loot context params (e.g. this_entity, origin, tool)

Bedrock Edition usage

Unlike Java Edition, where there is a unified standard and handling methods of them, namespaced identifiers are usually treated as normal strings in Bedrock Edition. Moreover, some objects are identified based on their path (e.g. the identifier for Minecraft:recipes and trades) rather than what was defined in their file. In these cases, it is recommended that a folder named after the namespace is parented before the file at hand.<ref name="cooperative">Template:Citation</ref>

The following is a list of all places that use namespaced identifiers:

Built-in contents

  • Blocks
  • Block traits
  • Block entities
  • Items
  • Entities
  • Status effects
  • Dimensions
  • Biomes
  • Structures
  • Features
  • Entity attributes
  • Item NBT components
  • Item components
  • Block components
  • Entity components
  • JSON schemas
  • GameTest script-enabled components

Registried add-on entries

A registried add-on entry refers to any add-on content that is registered with an identifier declared within the content's file definition. Custom content under these types are able to be created.

Here is a list of registried add-on entries whose identifiers are namespaced.

Behavior pack contents
  • Blocks
  • Block states
  • Entities
  • Entity events
  • Items
  • Spawn rules
  • Biomes
  • Features
  • Feature rules
  • Recipes
  • Structures
  • GameTests
  • Dialog scenes
  • Spawn groups
  • Structure sets
  • Template pools
  • Processor lists
  • Catalog groups
Resource pack contents
  • Attachables
  • Cameras
  • Entity client definitions
  • Particle effects
  • Biome client definitions
  • Fog settings
  • Lighting settings
  • Atmosphere settings
  • Color grading settings
  • Water effect settings

Some custom fields in add-on files can also be namespaced, such as custom block properties and entity component groups, which aren't listed here.

Others

  • Structures saved from a structure block

Script-registered entries

Some content may also be registered within the scripts of behavior packs. These are read as the world is generating.

  • Block components
  • Item components
  • Commands

Namespaces

"

This isn't a new concept, but I thought I should reiterate what a "namespace" is. Most things in the game has a namespace, so that if we add Template:Cd and a mod (or map, or whatever) adds Template:Cd, they're both different Template:Cds. Whenever you're asked to name something, for example a loot table, you're expected to also provide what namespace that thing comes from. If you don't specify the namespace, we default to Template:Cd. This means that Template:Cd and Template:Cd are the same thing.

A namespace is a domain for content. It is to prevent potential content conflicts or unintentional overrides of objects of the same name.

For example, two data packs add two minigame mechanisms to Minecraft; both have a function named Template:Cd. Without namespaces, these two functions would clash and the minigames would be broken. When they have different namespaces of Template:Cd and Template:Cd, the functions would become Template:Cd and Template:Cd, which no longer conflict.

Template:Cd namespace

Minecraft reserves the Template:Cd namespace. When a namespace is not specified, an identifier falls back to Template:CdTemplate:Only. As a result, the Template:Cd namespace should only be used by content creators when the content needs to overwrite or modify existing Minecraft data, such as adding a function to the Template:Cd function tag.

Custom namespace

The namespace should be distinct for different projects or content creations (e.g. a data pack, a resource pack, a mod, backing data/resource packs for a custom map, etc.)

To prevent potential clashes, it is recommended that the namespace should be as specific as possible:

  • Avoid alphabet soups. For example, a project named "nuclear craft" should not use the namespace Template:Cd, as this is too ambiguous.
  • Avoid words that are too vague. Template:Cd would not be informative to look up as well, but Template:Cd would be much better.
  • For Minecraft:add-ons, use a shortened creator name followed by the name of the project in a format like Template:Cd.<ref name="cooperative"/>

In either case, these poorly chosen namespaces reduce the exposure of a project and bring difficulties for debugging when there are multiple content creations applied to the game.

Other built-in namespaces

Template:IN, the vanilla Minecraft resource pack declares Realms-oriented language files in the Template:Cd namespace (located at assets/realms/lang/.json) and game-related language files in the Template:Cd namespace, even though translation keys are not identifiers. The realms jar itself also declares its en_us.json language file and its various textures in the Template:Cd namespace.

In the IDs of command argument types, a Template:Cd namespace also appears for command argument types that are native to Minecraft:Brigadier.

Template:IN, the internal resource and behavior packs for Minecraft:Bedrock Editor contain some entities and items namespaced with editor.

History

Java Edition

Template:HistoryTable

Bedrock Edition

Template:HistoryTable

See also

References

Template:Reflist

External links

Navigation

Template:Navbox Java Edition technical Template:Navbox Bedrock Edition

Minecraft:de:Namensraum Minecraft:es:Identificador Minecraft:fr:Identifiant Minecraft:ja:識別子 Minecraft:ko:식별자 Minecraft:pt:Localização de recurso Minecraft:ru:Пространство имён идентификаторов Minecraft:uk:Простір імен ідентифікаторів Minecraft:zh:命名空间ID