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

Minecraft:Block components/Upstream: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Sync: upstream version from Minecraft
 
SyncBot (talk | contribs)
Fix template calls: add MC/ prefix
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{For|item components|Item components}}
{{MC/For|item components|Item components}}
{{exclusive|bedrock}}
{{MC/Exclusive|bedrock}}
Block components are [[Minecraft:JSON]] objects that are added to a custom [[Minecraft:block definition]] in a [[Minecraft:behavior pack]] to customize the [[Minecraft:block]]'s behavior and visuals.
Block components are [[Minecraft:JSON]] objects that are added to a custom [[Minecraft:block definition]] in a [[Minecraft:behavior pack]] to customize the [[Minecraft:block]]'s behavior and visuals.
{{TOC|right}}
{{MC/Toc|right}}


== Applying ==
== Applying ==


Block components can be applied by adding them to {{cd|components}} within {{cd|minecraft:block}} in the block's definition file.
Block components can be applied by adding them to {{MC/Cd|components}} within {{MC/Cd|minecraft:block}} in the block's definition file.


Components can also be found in a {{cd|components}} object located in objects within the {{cd|permutations}} array. This can be used to make a component only active when the permutation's {{cd|condition}} evaluates to {{cd|true}}.
Components can also be found in a {{MC/Cd|components}} object located in objects within the {{MC/Cd|permutations}} array. This can be used to make a component only active when the permutation's {{MC/Cd|condition}} evaluates to {{MC/Cd|true}}.


=== Tags ===
=== Tags ===
{{In development|be||26.20|note=Replaced with the [[#minecraft:tags|minecraft:tags]] component.|removed=1|section=1}}
{{MC/In development|be||26.20|note=Replaced with the [[#minecraft:tags|minecraft:tags]] component.|removed=1|section=1}}


Tags are used to categorize blocks and allow them to work better with vanilla blocks and items. Both vanilla and custom [[Minecraft:Block tag (Bedrock Edition)|block tags]] can be added. Tags are added with other components, as an empty object with the format: <code>"tag:''<tag_name>''": {}</code>
Tags are used to categorize blocks and allow them to work better with vanilla blocks and items. Both vanilla and custom [[Minecraft:Block tag (Bedrock Edition)|block tags]] can be added. Tags are added with other components, as an empty object with the format: <code>"tag:''<tag_name>''": {}</code>
Line 23: Line 23:


Permutations are used to make some block components active only under certain conditions.
Permutations are used to make some block components active only under certain conditions.
Permutations are defined in the {{cd|permutations}} array within {{cd|minecraft:block}}, and consist of two properties:
Permutations are defined in the {{MC/Cd|permutations}} array within {{MC/Cd|minecraft:block}}, and consist of two properties:
* {{nbt|string|condition}}: A molang expression resolving to a boolean, representing when the permutation's components should be active. This is most often a [[Minecraft:block state]] query. For example:  
* {{MC/Nbt|string|condition}}: A molang expression resolving to a boolean, representing when the permutation's components should be active. This is most often a block state query. For example:  
<syntaxhighlight lang=json copy>
<syntaxhighlight lang=json copy>
"condition": "query.block_state('minecraft:cardinal_direction') == 'north'"</syntaxhighlight>
"condition": "query.block_state('minecraft:cardinal_direction') == 'north'"</syntaxhighlight>
* {{nbt|compound|components}}: The [[#Components list|components]] for this permutation.
* {{MC/Nbt|compound|components}}: The [[#Components list|components]] for this permutation.


Example:
Example:
Line 57: Line 57:


=== <code>minecraft:chest_obstruction</code> ===
=== <code>minecraft:chest_obstruction</code> ===
{{Experimental|be||be=Upcoming Creator Features|untilbe=26.20}}
{{MC/Experimental|be||be=Upcoming Creator Features|untilbe=26.20}}
Defines how the block should obstruct [[Minecraft:chest]]s from opening when placed above one.
Defines how the block should obstruct [[Minecraft:chest]]s from opening when placed above one.


Line 63: Line 63:


<div class="treeview">
<div class="treeview">
* {{nbt|compound|minecraft:chest_obstruction}}: The component root.
* {{MC/Nbt|compound|minecraft:chest_obstruction}}: The component root.
** {{nbt|string|obstruction_rule}}: ''Optional.'' How the block is evaluated during chest opening if the block is placed above the chest. Defaults to <code>shape</code>. Valid values are:
** {{MC/Nbt|string|obstruction_rule}}: ''Optional.'' How the block is evaluated during chest opening if the block is placed above the chest. Defaults to <code>shape</code>. Valid values are:
*** '''<code>always</code>''': The block will always obstruct a chest from opening.
*** '''<code>always</code>''': The block will always obstruct a chest from opening.
*** '''<code>never</code>''': The block will never obstruct a chest from opening.
*** '''<code>never</code>''': The block will never obstruct a chest from opening.
Line 79: Line 79:


=== <code>minecraft:collision_box</code> ===
=== <code>minecraft:collision_box</code> ===
Defines the block's [[Minecraft:hitbox#Collision box|collision box]]. This component can be specified in 3 ways.
Defines the block's collision box. This component can be specified in 3 ways.


* '''As a single {{cd|true}} or {{cd|false}} value:'''
* '''As a single {{MC/Cd|true}} or {{MC/Cd|false}} value:'''


Example:
Example:
Line 93: Line 93:
Fields:
Fields:


* '''{{cd|origin}}''':
* '''{{MC/Cd|origin}}''':
** The origin of the collision box. (0,0,0) represents the bottom center of the block.
** The origin of the collision box. (0,0,0) represents the bottom center of the block.
* '''{{cd|size}}''':
* '''{{MC/Cd|size}}''':
** The size of the collision box. The total size of the collision box may not be larger than 16&times;24&times;16.
** The size of the collision box. The total size of the collision box may not be larger than 16&times;24&times;16.


Line 128: Line 128:
=== <code>minecraft:connection_rule</code> ===
=== <code>minecraft:connection_rule</code> ===


Defines which blocks this block can connect to with the {{cd|minecraft:connection}} [[Minecraft:block trait]].
Defines which blocks this block can connect to with the {{MC/Cd|minecraft:connection}} block trait.


Fields:
Fields:


* '''{{cd|accepts_connections_from}}''':
* '''{{MC/Cd|accepts_connections_from}}''':
** ''Optional.'' Which blocks this block can connect to. If omitted, the block accepts connections from all blocks. Allowed values are {{cd|d=and|all|only_fences|none}}.
** ''Optional.'' Which blocks this block can connect to. If omitted, the block accepts connections from all blocks. Allowed values are {{MC/Cd|d=and|all|only_fences|none}}.
* '''{{cd|enabled_directions}}''':
* '''{{MC/Cd|enabled_directions}}''':
** ''Optional.'' Enables connection in only certain directions, disabling others; available values are {{cd|north}}, {{cd|south}}, {{cd|west}}, and {{cd|east}}.
** ''Optional.'' Enables connection in only certain directions, disabling others; available values are {{MC/Cd|north}}, {{MC/Cd|south}}, {{MC/Cd|west}}, and {{MC/Cd|east}}.


Example:
Example:
Line 146: Line 146:


=== <code>minecraft:crafting_table</code> ===
=== <code>minecraft:crafting_table</code> ===
Gives a custom block the functionality of a [[Minecraft:crafting table]].
Gives a custom block the functionality of a crafting table.


Fields:
Fields:


* '''{{cd|crafting_tags}}''':
* '''{{MC/Cd|crafting_tags}}''':
** An array of [[Minecraft:recipe]] tags that this block should be able to craft. There can be at most 64 tags, and each tag can be at most 64 characters.
** An array of recipe tags that this block should be able to craft. There can be at most 64 tags, and each tag can be at most 64 characters.
** The default tag for vanilla crafting recipes is {{cd|crafting_table}}, and custom tags can be specified to allow crafting of recipes with that tag in their [[Minecraft:Recipe#Bedrock Edition JSON format|definition]].
** The default tag for vanilla crafting recipes is {{MC/Cd|crafting_table}}, and custom tags can be specified to allow crafting of recipes with that tag in their definition.
* '''{{cd|table_name}}''':
* '''{{MC/Cd|table_name}}''':
** The name to display in the crafting table UI. Specified as a localization string, or will resort to a regular string if it can't be resolved.
** The name to display in the crafting table UI. Specified as a localization string, or will resort to a regular string if it can't be resolved.


Line 169: Line 169:


=== <code>minecraft:destructible_by_explosion</code> ===
=== <code>minecraft:destructible_by_explosion</code> ===
Defines whether the block can be destroyed by [[Minecraft:explosions]], and sets its [[Minecraft:blast resistance]].
Defines whether the block can be destroyed by explosions, and sets its blast resistance.
This component can be defined in two ways.
This component can be defined in two ways.


* '''As a boolean ({{cd|true}} or {{cd|false}}) value:'''
* '''As a boolean ({{MC/Cd|true}} or {{MC/Cd|false}}) value:'''


Example:
Example:
Line 184: Line 184:
Fields:
Fields:


* '''{{cd|explosion_resistance}}''':
* '''{{MC/Cd|explosion_resistance}}''':
** Sets the block's resistance to explosions.
** Sets the block's resistance to explosions.
** ''Note that the actual blast resistance value of the block is 1/5 of the value set here.''
** ''Note that the actual blast resistance value of the block is 1/5 of the value set here.''
Line 197: Line 197:


=== <code>minecraft:destructible_by_mining</code> ===
=== <code>minecraft:destructible_by_mining</code> ===
Defines whether the block can be [[Minecraft:mined]] and sets its [[Minecraft:hardness]].
Defines whether the block can be mined and sets its hardness.
This component can be defined in two ways.
This component can be defined in two ways.


'''As a boolean ({{cd|true}} or {{cd|false}}) value:'''
'''As a boolean ({{MC/Cd|true}} or {{MC/Cd|false}}) value:'''


A value of {{cd|true}} makes the block destructible in 0 seconds, making it able to be [[Minecraft:instant mine|instant mined]].
A value of {{MC/Cd|true}} makes the block destructible in 0 seconds, making it able to be instant mined.
A value of {{cd|false}} makes the block indestructible by mining.
A value of {{MC/Cd|false}} makes the block indestructible by mining.


Example:
Example:
Line 215: Line 215:
Structure:
Structure:
<div class="treeview">
<div class="treeview">
* {{nbt|compound|minecraft:destructible_by_mining}}: (root of component)
* {{MC/Nbt|compound|minecraft:destructible_by_mining}}: (root of component)
** {{nbt|list|item_specific_speeds}}
** {{MC/Nbt|list|item_specific_speeds}}
*** {{nbt|compound|An item}}:
*** {{MC/Nbt|compound|An item}}:
**** {{nbt|int|destroy_speed}}: The hardness of the block when mined with the target item(s).
**** {{MC/Nbt|int|destroy_speed}}: The hardness of the block when mined with the target item(s).
**** {{nbt|string}}{{nbt|compound|item}}: A description of the item(s). Either a string item identifier or an object.
**** {{MC/Nbt|string}}{{MC/Nbt|compound|item}}: A description of the item(s). Either a string item identifier or an object.
***** {{nbt|string|tags}}: A [[Minecraft:Molang]] expression defining the [[Minecraft:Item tag (Bedrock Edition)|tags]] of the target item(s).
***** {{MC/Nbt|string|tags}}: A [[Minecraft:Molang]] expression defining the [[Minecraft:Item tag (Bedrock Edition)|tags]] of the target item(s).
** {{nbt|int|seconds_to_destroy}}
** {{MC/Nbt|int|seconds_to_destroy}}
</div>
</div>


Fields:
Fields:
* '''{{cd|seconds_to_destroy}}''': The amount of time it takes to destroy the block. ''Note that this sets the block's hardness value, not the actual seconds to destroy!''
* '''{{MC/Cd|seconds_to_destroy}}''': The amount of time it takes to destroy the block. ''Note that this sets the block's hardness value, not the actual seconds to destroy!''
* '''{{cd|item_specific_speeds}}''': ''Optional.'' Specific breaking speed values for each item, it is recommended to use tags because manually defining items can make the list unnecessarily long and remove compatibility with the enchantment [[Minecraft:Efficiency]].
* '''{{MC/Cd|item_specific_speeds}}''': ''Optional.'' Specific breaking speed values for each item, it is recommended to use tags because manually defining items can make the list unnecessarily long and remove compatibility with the enchantment Efficiency.
Example:
Example:
<syntaxhighlight lang=json copy>
<syntaxhighlight lang=json copy>
Line 251: Line 251:
Fields:
Fields:


* '''{{cd|particle_count}}''':
* '''{{MC/Cd|particle_count}}''':
** ''Optional.'' Sets the number of particles created when the block destroyed. Default is {{cd|100}}, maximum is {{cd|255}}.
** ''Optional.'' Sets the number of particles created when the block destroyed. Default is {{MC/Cd|100}}, maximum is {{MC/Cd|255}}.
* '''{{cd|texture}}''':
* '''{{MC/Cd|texture}}''':
** ''Optional.'' The [[Minecraft:texture]] to use for the particles. This is a texture name defined in {{cd|terrain_texture.json}}. Defaults to the texture of the {{cd|down}} material instance.
** ''Optional.'' The texture to use for the particles. This is a texture name defined in {{MC/Cd|terrain_texture.json}}. Defaults to the texture of the {{MC/Cd|down}} material instance.
* '''{{cd|tint_method}}''':
* '''{{MC/Cd|tint_method}}''':
** ''Optional.'' The method with which the particles are tinted. Default is {{cd|none}}.
** ''Optional.'' The method with which the particles are tinted. Default is {{MC/Cd|none}}.
** Can be {{cd|none|default_foliage|birch_foliage|evergreen_foliage|dry_foliage|grass|water|d=or}}.
** Can be {{MC/Cd|none|default_foliage|birch_foliage|evergreen_foliage|dry_foliage|grass|water|d=or}}.


Example:
Example:
Line 282: Line 282:


=== <code>minecraft:embedded_visual</code> ===
=== <code>minecraft:embedded_visual</code> ===
Sets the visuals of the block when it is embedded, such as in a [[Minecraft:flowerpot]].
Sets the visuals of the block when it is embedded, such as in a flowerpot.
This component can not be specified in entries in the {{cd|permutations}} array.
This component can not be specified in entries in the {{MC/Cd|permutations}} array.


Fields:
Fields:


* '''{{cd|geometry}}''':
* '''{{MC/Cd|geometry}}''':
** A [[#minecraft:geometry|{{cd|minecraft:geometry}}]] component defining the embedded geometry.
** A [[#minecraft:geometry|{{MC/Cd|minecraft:geometry}}]] component defining the embedded geometry.
* '''{{cd|material_instances}}''':
* '''{{MC/Cd|material_instances}}''':
** A [[#minecraft:material_instances|{{cd|minecraft:material_instances}}]] component defining the embedded material.
** A [[#minecraft:material_instances|{{MC/Cd|minecraft:material_instances}}]] component defining the embedded material.


Example:
Example:
Line 306: Line 306:


=== <code>minecraft:entity_fall_on</code> ===
=== <code>minecraft:entity_fall_on</code> ===
Configures the fall distance required to trigger the {{cd|onEntityFallOn}} custom component [[Minecraft:Add-on#Scripting|script]] event. The distance defaults to 1 block if omitted.
Configures the fall distance required to trigger the {{MC/Cd|onEntityFallOn}} custom component [[Minecraft:Add-on#Scripting|script]] event. The distance defaults to 1 block if omitted.


Fields:
Fields:


* '''{{cd|min_fall_distance}}''':
* '''{{MC/Cd|min_fall_distance}}''':
** The distance an entity must fall to trigger the event.
** The distance an entity must fall to trigger the event.


Line 322: Line 322:


=== <code>minecraft:flammable</code> ===
=== <code>minecraft:flammable</code> ===
Defines how [[Minecraft:flammable]] the block is, in this case, all blocks with this component will burn from fire and lava, unlike vanilla where some blocks do not burn from lava.
Defines how flammable the block is, in this case, all blocks with this component will burn from fire and lava, unlike vanilla where some blocks do not burn from lava.
This component can be defined in two ways.
This component can be defined in two ways.


* '''As a boolean ({{cd|true}} or {{cd|false}}) property:'''
* '''As a boolean ({{MC/Cd|true}} or {{MC/Cd|false}}) property:'''


If {{cd|true}}, the block can catch fire from nearby blocks. The chance modifier for catching fire is automatically set to 5, and the chance modifier for the block being destroyed by fire is set to 20.
If {{MC/Cd|true}}, the block can catch fire from nearby blocks. The chance modifier for catching fire is automatically set to 5, and the chance modifier for the block being destroyed by fire is set to 20.


If {{cd|false}} (or omitted) the block will only catch fire if directly ignited.
If {{MC/Cd|false}} (or omitted) the block will only catch fire if directly ignited.


Example:
Example:
Line 341: Line 341:
Fields:
Fields:


* '''{{cd|catch_chance_modifier}}''':
* '''{{MC/Cd|catch_chance_modifier}}''':
** ''Optional.'' The chance that the block catches fire from a nearby block. Default is 5.
** ''Optional.'' The chance that the block catches fire from a nearby block. Default is 5.
** If greater than 0, fire on the block will burn until it is destroyed or the fire is put out. If {{cd|destroy_chance_modifier}} is 0, the block will burn forever.
** If greater than 0, fire on the block will burn until it is destroyed or the fire is put out. If {{MC/Cd|destroy_chance_modifier}} is 0, the block will burn forever.
** If 0 the block will eventually burn out (if it isn't destroyed).
** If 0 the block will eventually burn out (if it isn't destroyed).
* '''{{cd|destroy_change_modifier}}''':
* '''{{MC/Cd|destroy_change_modifier}}''':
** ''Optional.'' The chance the block is destroyed while on fire. Default is 20.
** ''Optional.'' The chance the block is destroyed while on fire. Default is 20.
** If 0, the block will not be destroyed by fire.
** If 0, the block will not be destroyed by fire.
Line 359: Line 359:


=== <code>minecraft:flower_pottable</code> ===
=== <code>minecraft:flower_pottable</code> ===
Indicates that this block can be placed inside a [[Minecraft:flower pot]]. The geometry of the block while inside a flower pot is specified by [[#minecraft:geometry|{{cd|minecraft:geometry}}]] by default, but it can be changed with [[#minecraft:embedded_visual|{{cd|minecraft:embedded_visual}}]].
Indicates that this block can be placed inside a flower pot. The geometry of the block while inside a flower pot is specified by [[#minecraft:geometry|{{MC/Cd|minecraft:geometry}}]] by default, but it can be changed with [[#minecraft:embedded_visual|{{MC/Cd|minecraft:embedded_visual}}]].
This component is specified as an empty object, and can not be specified in an entry to the {{cd|permutations}} array.
This component is specified as an empty object, and can not be specified in an entry to the {{MC/Cd|permutations}} array.


Example:
Example:
Line 370: Line 370:
=== <code>minecraft:friction</code> ===
=== <code>minecraft:friction</code> ===
Describes the block's friction.
Describes the block's friction.
This component is specified as a decimal number between {{cd|0.0}} and {{cd|9.0}}.
This component is specified as a decimal number between {{MC/Cd|0.0}} and {{MC/Cd|9.0}}.


Example:
Example:
Line 379: Line 379:


=== <code>minecraft:geometry</code> ===
=== <code>minecraft:geometry</code> ===
Defines the geometry of the block. There are three vanilla models that can be used: {{cd|minecraft:geometry.full_block|minecraft:geometry.cross|minecraft:geometry.full_block_v1|d=and}}. You can also use your own model from a [[Minecraft:resource pack]].
Defines the geometry of the block. There are three vanilla models that can be used: {{MC/Cd|minecraft:geometry.full_block|minecraft:geometry.cross|minecraft:geometry.full_block_v1|d=and}}. You can also use your own model from a resource pack.
This component must be included with [[#minecraft:material_instances|{{cd|minecraft:material_instances}}]]. This component can be specified in two ways.
This component must be included with [[#minecraft:material_instances|{{MC/Cd|minecraft:material_instances}}]]. This component can be specified in two ways.


* '''As a string:'''
* '''As a string:'''
Line 396: Line 396:
Fields:
Fields:


* '''{{cd|bone_visibility}}''':
* '''{{MC/Cd|bone_visibility}}''':
** ''Optional.'' Defines the visibility of each bone. All bones are visible by default.
** ''Optional.'' Defines the visibility of each bone. All bones are visible by default.
** A key-value map of bone names from the model to [[Minecraft:molang]] expressions that result in boolean values.
** A key-value map of bone names from the model to [[Minecraft:molang]] expressions that result in boolean values.
* '''{{cd|culling}}''':
* '''{{MC/Cd|culling}}''':
** ''Optional.'' An identifier of a culling definition.
** ''Optional.'' An identifier of a culling definition.
* '''{{cd|culling_layer}}''':
* '''{{MC/Cd|culling_layer}}''':
** ''Optional.'' A string to group multiple blocks when comparing them in a culling rule. Default is {{cd|minecraft:culling_layer.undefined}} but there is also {{cd|minecraft:culling_layer.leaves}} as vanilla.
** ''Optional.'' A string to group multiple blocks when comparing them in a culling rule. Default is {{MC/Cd|minecraft:culling_layer.undefined}} but there is also {{MC/Cd|minecraft:culling_layer.leaves}} as vanilla.
* '''{{cd|culling_shape}}''':{{OnlyExperimental|Experimental Voxel Shape Features}}
* '''{{MC/Cd|culling_shape}}''':{{OnlyExperimental|Experimental Voxel Shape Features}}
** ''Optional.'' An identifier of a voxel shape definition.
** ''Optional.'' An identifier of a voxel shape definition.
** Vanilla shapes are {{cd|minecraft:unit_cube|minecraft:empty|d=and}}.
** Vanilla shapes are {{MC/Cd|minecraft:unit_cube|minecraft:empty|d=and}}.
* '''{{cd|identifier}}''':
* '''{{MC/Cd|identifier}}''':
** The identifier of the block model to use.
** The identifier of the block model to use.
* '''{{cd|uv_lock}}''':
* '''{{MC/Cd|uv_lock}}''':
** ''Optional.'' Sets whether UVs should be locked to their original rotations, regardless of the [[#minecraft:transformation|{{cd|minecraft:transformation}}]] component.
** ''Optional.'' Sets whether UVs should be locked to their original rotations, regardless of the [[#minecraft:transformation|{{MC/Cd|minecraft:transformation}}]] component.
** Can be an array of bone names to lock, {{cd|false}} (default) which locks none, or {{cd|true}} which locks all bones.
** Can be an array of bone names to lock, {{MC/Cd|false}} (default) which locks none, or {{MC/Cd|true}} which locks all bones.


Example:
Example:
Line 432: Line 432:
Fields:
Fields:


* '''{{cd|geometry}}''':
* '''{{MC/Cd|geometry}}''':
** A [[#minecraft:geometry|{{cd|minecraft:geometry}}]] component defining the geometry of the block item.
** A [[#minecraft:geometry|{{MC/Cd|minecraft:geometry}}]] component defining the geometry of the block item.
* '''{{cd|material_instances}}''':
* '''{{MC/Cd|material_instances}}''':
** A [[#minecraft:material_instances|{{cd|minecraft:material_instances}}]] component defining the material of the block item.
** A [[#minecraft:material_instances|{{MC/Cd|minecraft:material_instances}}]] component defining the material of the block item.


Example:
Example:
Line 467: Line 467:


=== <code>minecraft:light_dampening</code> ===
=== <code>minecraft:light_dampening</code> ===
Sets the number of [[Minecraft:light levels]] that will be dampened by the block. This component is specified as an integer between 0 and 15, where 15 blocks all light.
Sets the number of light levels that will be dampened by the block. This component is specified as an integer between 0 and 15, where 15 blocks all light.


Example:
Example:
Line 486: Line 486:


=== <code>minecraft:liquid_detection</code> ===
=== <code>minecraft:liquid_detection</code> ===
Defines how the block responds to [[Minecraft:liquids]].
Defines how the block responds to liquids.


Structure:
Structure:


<div class="treeview">
<div class="treeview">
* {{nbt|compound|minecraft:liquid_detection}}: The component root.
* {{MC/Nbt|compound|minecraft:liquid_detection}}: The component root.
** {{nbt|list|detection_rules}}: An array of liquid rules.
** {{MC/Nbt|list|detection_rules}}: An array of liquid rules.
*** {{nbt|compound}}: ''A rule''
*** {{MC/Nbt|compound}}: ''A rule''
**** {{nbt|bool|can_contain_liquid}}: {{cd|true}} or {{cd|false}} whether the liquid can occupy the same space as the block. In other words, can it be [[Minecraft:waterlogged]]?
**** {{MC/Nbt|bool|can_contain_liquid}}: {{MC/Cd|true}} or {{MC/Cd|false}} whether the liquid can occupy the same space as the block. In other words, can it be waterlogged?
**** {{nbt|string|liquid_type}}: The type of liquid this rule applies to. Currently, the only available value is {{cd|water}}.
**** {{MC/Nbt|string|liquid_type}}: The type of liquid this rule applies to. Currently, the only available value is {{MC/Cd|water}}.
**** {{nbt|string|on_liquid_touches}}: ''Optional.'' Sets what happens when liquid touches the block. Available values are:
**** {{MC/Nbt|string|on_liquid_touches}}: ''Optional.'' Sets what happens when liquid touches the block. Available values are:
***** {{cd|blocking}}: ''Default.'' The block stops liquid from flowing through it.
***** {{MC/Cd|blocking}}: ''Default.'' The block stops liquid from flowing through it.
***** {{cd|broken}}: The block is destroyed on contact with flowing liquid.
***** {{MC/Cd|broken}}: The block is destroyed on contact with flowing liquid.
***** {{cd|popped}}: The block breaks and drops its loot on contact with flowing liquid.
***** {{MC/Cd|popped}}: The block breaks and drops its loot on contact with flowing liquid.
***** {{cd|no_reaction}}: Liquids flow through the block as if it is not there.
***** {{MC/Cd|no_reaction}}: Liquids flow through the block as if it is not there.
**** {{nbt|list|stops_liquid_flowing_from_direction}}: ''Optional.'' An array of directions from which liquid can not flow out of (or in to, if {{cd|on_liquid_touches}} is set to {{cd|no_reaction}}) the block.
**** {{MC/Nbt|list|stops_liquid_flowing_from_direction}}: ''Optional.'' An array of directions from which liquid can not flow out of (or in to, if {{MC/Cd|on_liquid_touches}} is set to {{MC/Cd|no_reaction}}) the block.
**** {{nbt|bool|use_liquid_clipping}}: {{cd|true}} means the block will use the [[#minecraft:collision_box|{{cd|minecraft:collision_box}}]] to visually clip the water like the [[Minecraft:stairs]], {{cd|false}} ignores liquid clipping, which will render water across the whole block how current behavior.
**** {{MC/Nbt|bool|use_liquid_clipping}}: {{MC/Cd|true}} means the block will use the [[#minecraft:collision_box|{{MC/Cd|minecraft:collision_box}}]] to visually clip the water like the [[Minecraft:stairs]], {{MC/Cd|false}} ignores liquid clipping, which will render water across the whole block how current behavior.
</div>
</div>


Line 557: Line 557:
Fields:
Fields:


* '''{{cd|color}}''':
* '''{{MC/Cd|color}}''':
** The color to use on the map.
** The color to use on the map.
** This is specified as an RGB array, or an hex string, as described above.
** This is specified as an RGB array, or an hex string, as described above.
* '''{{cd|tint_method}}''':
* '''{{MC/Cd|tint_method}}''':
** ''Optional.'' The method to use to [[Minecraft:Biome#Tint|tint]] the color based on the [[Minecraft:biome]]. Available values are {{cd|none|default_foliage|birch_foliage|evergreen_foliage|dry_foliage|grass|water|d=and}}.
** ''Optional.'' The method to use to [[Minecraft:Biome#Tint|tint]] the color based on the [[Minecraft:biome]]. Available values are {{MC/Cd|none|default_foliage|birch_foliage|evergreen_foliage|dry_foliage|grass|water|d=and}}.


Example:
Example:
Line 573: Line 573:


=== <code>minecraft:material_instances</code> ===
=== <code>minecraft:material_instances</code> ===
Defines the materials and textures of the block. This component must be included with [[#minecraft:geometry|{{cd|minecraft:geometry}}]].
Defines the materials and textures of the block. This component must be included with [[#minecraft:geometry|{{MC/Cd|minecraft:geometry}}]].


Structure:
Structure:


<div class="treeview">
<div class="treeview">
* {{nbt|compound|minecraft:material_instances}}: The component root.
* {{MC/Nbt|compound|minecraft:material_instances}}: The component root.
** {{nbt|string}}{{nbt|compound|'''*'{{!}}<block face>{{!}}<material name>''}}: A material instance definition, or the name of a material instance. The name of the property can be the name of a block face, a "*" to map to all block faces, or a custom name to define a material instance.
** {{MC/Nbt|string}}{{nbt|compound|'''*'{{!}}<block face>{{!}}<material name>''}}: A material instance definition, or the name of a material instance. The name of the property can be the name of a block face, a "*" to map to all block faces, or a custom name to define a material instance.
*** {{nbt|boolean}}{{nbt|float|ambient_occlusion}}: ''Optional.'' Whether the block should have ambient occlusion, and its intensity.
*** {{MC/Nbt|boolean}}{{MC/Nbt|float|ambient_occlusion}}: ''Optional.'' Whether the block should have ambient occlusion, and its intensity.
*** {{nbt|boolean|face_dimming}}: ''Optional.'' Sets if these faces are dimmed by their direction.
*** {{MC/Nbt|boolean|face_dimming}}: ''Optional.'' Sets if these faces are dimmed by their direction.
*** {{nbt|boolean|isotropic}}: ''Optional.'' Should the UVs for these faces be randomly rotated based on position?
*** {{MC/Nbt|boolean|isotropic}}: ''Optional.'' Should the UVs for these faces be randomly rotated based on position?
*** {{nbt|string|render_method}}: ''Optional.'' The block's render method.
*** {{MC/Nbt|string|render_method}}: ''Optional.'' The block's render method.
**** {{cd|opaque}}: ''Default.'' Non-transparent texture, viewable from the full render distance.
**** {{MC/Cd|opaque}}: ''Default.'' Non-transparent texture, viewable from the full render distance.
**** {{cd|alpha_test}}: Allows for transparent textures, but disables backface culling, and can only be viewed from half the render distance.
**** {{MC/Cd|alpha_test}}: Allows for transparent textures, but disables backface culling, and can only be viewed from half the render distance.
**** {{cd|alpha_test_single_sided}}: Like {{cd|alpha_test}}, but reenables backface culling. Also can only be viewed from half the render distance.
**** {{MC/Cd|alpha_test_single_sided}}: Like {{MC/Cd|alpha_test}}, but reenables backface culling. Also can only be viewed from half the render distance.
**** {{cd|blend}}: Allows for texture translucency, but disables backface culling.
**** {{MC/Cd|blend}}: Allows for texture translucency, but disables backface culling.
**** {{cd|double_sided}}: Like {{cd|opaque}}, but disables backface culling.
**** {{MC/Cd|double_sided}}: Like {{MC/Cd|opaque}}, but disables backface culling.
**** {{cd|alpha_test_to_opaque}}: {{cd|alpha_test}}, but past half the render distance it shifts to {{cd|opaque}}, like [[Minecraft:leaves]].
**** {{MC/Cd|alpha_test_to_opaque}}: {{MC/Cd|alpha_test}}, but past half the render distance it shifts to {{MC/Cd|opaque}}, like [[Minecraft:leaves]].
**** {{cd|alpha_test_single_sided_to_opaque}}: {{cd|alpha_test_single_sided}}, but past half the render distance it shifts to {{cd|opaque}}.
**** {{MC/Cd|alpha_test_single_sided_to_opaque}}: {{MC/Cd|alpha_test_single_sided}}, but past half the render distance it shifts to {{MC/Cd|opaque}}.
**** {{cd|blend_to_opaque}}: {{cd|blend}}, but past half the render distance it shifts to {{cd|opaque}}.
**** {{MC/Cd|blend_to_opaque}}: {{MC/Cd|blend}}, but past half the render distance it shifts to {{MC/Cd|opaque}}.
*** {{nbt|string|texture}}: Defines the texture for the material instance. This is the name of a texture defined within {{cd|terrain_texture.json}}.
*** {{MC/Nbt|string|texture}}: Defines the texture for the material instance. This is the name of a texture defined within {{MC/Cd|terrain_texture.json}}.
*** {{nbt|string|tint_method}}: ''Optional.'' Sets the method with which to [[Minecraft:Biome#Tint|tint]] the texture based on the biome. Available values are {{cd|none|default_foliage|birch_foliage|evergreen_foliage|dry_foliage|grass|water|d=and}}.
*** {{MC/Nbt|string|tint_method}}: ''Optional.'' Sets the method with which to [[Minecraft:Biome#Tint|tint]] the texture based on the biome. Available values are {{MC/Cd|none|default_foliage|birch_foliage|evergreen_foliage|dry_foliage|grass|water|d=and}}.
</div>
</div>


Line 609: Line 609:


=== <code>minecraft:movable</code> ===
=== <code>minecraft:movable</code> ===
Determines the block's behavior when being pushed or pulled by a [[Minecraft:piston]]. If trait [[Minecraft:Block definition#minecraft:multi_block| {{cd|minecraft:multi_block}}]] is defined, the component cannot be used in permutations, and the only available {{cd|movement_type}} are {{cd|popped|immovable|d=and}}.
Determines the block's behavior when being pushed or pulled by a [[Minecraft:piston]]. If trait [[Minecraft:Block definition#minecraft:multi_block| {{MC/Cd|minecraft:multi_block}}]] is defined, the component cannot be used in permutations, and the only available {{MC/Cd|movement_type}} are {{MC/Cd|popped|immovable|d=and}}.


Fields:
Fields:


* '''{{cd|movement_type}}''':
* '''{{MC/Cd|movement_type}}''':
** How the block will react to a piston.
** How the block will react to a piston.
** Can be {{cd|push_pull|push|popped|immovable|d=or}}.
** Can be {{MC/Cd|push_pull|push|popped|immovable|d=or}}.
* '''{{cd|sticky}}''':
* '''{{MC/Cd|sticky}}''':
** ''Optional.'' Whether or not the block affects nearby blocks when pushed or pulled, allowing behavior similar to [[Minecraft:Slime Block|slime]] or [[Minecraft:Honey Block|honey]] blocks.
** ''Optional.'' Whether or not the block affects nearby blocks when pushed or pulled, allowing behavior similar to [[Minecraft:Slime Block|slime]] or [[Minecraft:Honey Block|honey]] blocks.
** Can be {{cd|same|none|d=or}}. Default is {{cd|none}}.
** Can be {{MC/Cd|same|none|d=or}}. Default is {{MC/Cd|none}}.


Example:
Example:
Line 629: Line 629:


=== <code>minecraft:placement_filter</code> ===
=== <code>minecraft:placement_filter</code> ===
Defines the conditions in which the block can survive. If the conditions are not met, the block can not be placed, and if it already exists, it will break and drop itself. If trait [[Minecraft:Block definition#minecraft:multi_block| {{cd|minecraft:multi_block}}]] is defined, the component it cannot be used in permutations.
Defines the conditions in which the block can survive. If the conditions are not met, the block can not be placed, and if it already exists, it will break and drop itself. If trait [[Minecraft:Block definition#minecraft:multi_block| {{MC/Cd|minecraft:multi_block}}]] is defined, the component it cannot be used in permutations.


Structure:
Structure:


<div class="treeview">
<div class="treeview">
* {{nbt|compound|minecraft:placement_filter}}: The component root.
* {{MC/Nbt|compound|minecraft:placement_filter}}: The component root.
** {{nbt|list|conditions}}: A list of conditions.
** {{MC/Nbt|list|conditions}}: A list of conditions.
*** {{nbt|compound}} ''A condition''
*** {{MC/Nbt|compound}} ''A condition''
**** {{nbt|list|allowed_faces}}: ''Optional.'' A list of allowed faces the block can be placed on, or {{cd|all}} for all faces.
**** {{MC/Nbt|list|allowed_faces}}: ''Optional.'' A list of allowed faces the block can be placed on, or {{MC/Cd|all}} for all faces.
**** {{nbt|list|block_filter}}: ''Optional.'' A list of blocks that this block can be placed on.
**** {{MC/Nbt|list|block_filter}}: ''Optional.'' A list of blocks that this block can be placed on.
***** {{nbt|compound}} ''A filter''
***** {{MC/Nbt|compound}} ''A filter''
****** {{nbt|string|name}}: ''Optional.'' The block identifier.
****** {{MC/Nbt|string|name}}: ''Optional.'' The block identifier.
****** {{nbt|compound|states}}: ''Optional.'' A key-value map of block states to required values.
****** {{MC/Nbt|compound|states}}: ''Optional.'' A key-value map of block states to required values.
****** {{nbt|string|tags}}: ''Optional.'' A molang expression defining the [[Minecraft:Block tag (Bedrock Edition)|tags]] for the block.
****** {{MC/Nbt|string|tags}}: ''Optional.'' A molang expression defining the [[Minecraft:Block tag (Bedrock Edition)|tags]] for the block.
</div>
</div>


Line 663: Line 663:


=== <code>minecraft:precipitation_interactions</code> ===
=== <code>minecraft:precipitation_interactions</code> ===
Defines how the block is affected by [[Minecraft:precipitation]]. If the block has [[#minecraft:collision_box|{{cd|minecraft:collision_box}}]] that is not false, it will not be possible to use {{cd|snow_log_no_collision}}.
Defines how the block is affected by precipitation. If the block has [[#minecraft:collision_box|{{MC/Cd|minecraft:collision_box}}]] that is not false, it will not be possible to use {{MC/Cd|snow_log_no_collision}}.


Structure:
Structure:


<div class="treeview">
<div class="treeview">
* {{nbt|compound|minecraft:precipitation_interactions}}: The component root.
* {{MC/Nbt|compound|minecraft:precipitation_interactions}}: The component root.
** {{nbt|string|precipitation_behavior}}: The block's behavior with precipitation.
** {{MC/Nbt|string|precipitation_behavior}}: The block's behavior with precipitation.
*** {{cd|obstruct_rain_accumulate_snow}}: ''Default.'' Rain particles will land on the block, and [[Minecraft:snow layers]] will accumulate if it is snowing.
*** {{MC/Cd|obstruct_rain_accumulate_snow}}: ''Default.'' Rain particles will land on the block, and snow layers will accumulate if it is snowing.
*** {{cd|obstruct_rain}}: Rain particles will land on the block, but snow will not accumulate.
*** {{MC/Cd|obstruct_rain}}: Rain particles will land on the block, but snow will not accumulate.
*** {{cd|none}}: Rain and snow will pass through the block.
*** {{MC/Cd|none}}: Rain and snow will pass through the block.
*** {{cd|snow_log_no_collision}}:{{Upcoming|be 26.20}}{{OnlyExperimental|Upcoming Creator Features}} Snow will accumulate inside the block if it is snowing, causing it to become [[Minecraft:snowlogged]].
*** {{MC/Cd|snow_log_no_collision}}:{{MC/Upcoming|be 26.20}}{{OnlyExperimental|Upcoming Creator Features}} Snow will accumulate inside the block if it is snowing, causing it to become snowlogged.
</div>
</div>


Line 685: Line 685:


=== <code>minecraft:random_offset</code> ===
=== <code>minecraft:random_offset</code> ===
Allows the block's model to be randomly offset, similar to [[Minecraft:short grass]]. The chosen offset is still subject to the block model limits.
Allows the block's model to be randomly offset, similar to short grass. The chosen offset is still subject to the block model limits.
Due to current limitations, this component causes the block to be shadowed if it intersects another block.
Due to current limitations, this component causes the block to be shadowed if it intersects another block.


Line 691: Line 691:


<div class="treeview">
<div class="treeview">
* {{nbt|compound|minecraft:random_offset}}: The component root.
* {{MC/Nbt|compound|minecraft:random_offset}}: The component root.
** {{nbt|compound|''<axis>''}}: The settings for the axis ({{cd|x|y|z|d=or}}).
** {{MC/Nbt|compound|''<axis>''}}: The settings for the axis ({{MC/Cd|x|y|z|d=or}}).
*** {{nbt|int|steps}}: The number of possible values within the range to be chosen from. 0 means any value within the range can be chosen.
*** {{MC/Nbt|int|steps}}: The number of possible values within the range to be chosen from. 0 means any value within the range can be chosen.
*** {{nbt|compound|range}}: The range of values to choose from.
*** {{MC/Nbt|compound|range}}: The range of values to choose from.
**** {{nbt|float|max}}: The maximum possible value.
**** {{MC/Nbt|float|max}}: The maximum possible value.
**** {{nbt|float|min}}: The minimun possible value.
**** {{MC/Nbt|float|min}}: The minimun possible value.
</div>
</div>


Line 728: Line 728:


=== <code>minecraft:redstone_conductivity</code> ===
=== <code>minecraft:redstone_conductivity</code> ===
Defines how the block conducts [[Minecraft:redstone power]].
Defines how the block conducts redstone power.


Structure:
Structure:


<div class="treeview">
<div class="treeview">
* {{nbt|compound|minecraft:redstone_conductivity}}: The component root.
* {{MC/Nbt|compound|minecraft:redstone_conductivity}}: The component root.
** {{nbt|boolean|allows_wire_to_step_down}}: ''Optional.'' Sets whether [[Minecraft:redstone wire]] can step down the side of this block.
** {{MC/Nbt|boolean|allows_wire_to_step_down}}: ''Optional.'' Sets whether redstone wire can step down the side of this block.
** {{nbt|boolean|redstone_conductor}}: ''Optional.'' Sets whether the block [[Minecraft:Conductivity|conducts]] redstone.
** {{MC/Nbt|boolean|redstone_conductor}}: ''Optional.'' Sets whether the block conducts redstone.
</div>
</div>


Line 749: Line 749:
=== <code>minecraft:redstone_consumer</code> ===
=== <code>minecraft:redstone_consumer</code> ===


Allows the block to consume a redstone signal, sending the {{cd|onRedstoneUpdate}} custom component event to scripts when the power changes.
Allows the block to consume a redstone signal, sending the {{MC/Cd|onRedstoneUpdate}} custom component event to scripts when the power changes.


Structure:
Structure:


<div class="treeview">
<div class="treeview">
* {{nbt|compound|minecraft:redstone_consumer}}: The component root.
* {{MC/Nbt|compound|minecraft:redstone_consumer}}: The component root.
** {{nbt|int|min_power}}: ''Optional.'' Sets the minimum power required to trigger the script event. Must be between 0 and 15.
** {{MC/Nbt|int|min_power}}: ''Optional.'' Sets the minimum power required to trigger the script event. Must be between 0 and 15.
** {{nbt|boolean|propagates_power}}: ''Optional.'' Sets whether a redstone signal will pass through this block.
** {{MC/Nbt|boolean|propagates_power}}: ''Optional.'' Sets whether a redstone signal will pass through this block.
</div>
</div>


Line 774: Line 774:


<div class="treeview">
<div class="treeview">
* {{nbt|compound|minecraft:redstone_producer}}: The component root.
* {{MC/Nbt|compound|minecraft:redstone_producer}}: The component root.
** {{nbt|int|power}}: Sets the power level that this block produces. Must be between 0 and 15.
** {{MC/Nbt|int|power}}: Sets the power level that this block produces. Must be between 0 and 15.
** {{nbt|string|strongly_powered_face}}: ''Optional.'' Determines the face of the block that [[Minecraft:Strongly powered|strongly powers]] the block it is connected to.
** {{MC/Nbt|string|strongly_powered_face}}: ''Optional.'' Determines the face of the block that strongly powers the block it is connected to.
** {{nbt|list|connected_faces}}: ''Optional.'' A list of the faces of the block that emit redstone power.
** {{MC/Nbt|list|connected_faces}}: ''Optional.'' A list of the faces of the block that emit redstone power.
** {{nbt|boolean|transform_relative}}: ''Optional.'' Whether the faces selected should be relative to the [[#minecraft:transformation|{{cd|minecraft:transformation}}]] component.
** {{MC/Nbt|boolean|transform_relative}}: ''Optional.'' Whether the faces selected should be relative to the [[#minecraft:transformation|{{MC/Cd|minecraft:transformation}}]] component.
</div>
</div>


Line 793: Line 793:


=== <code>minecraft:replaceable</code> ===
=== <code>minecraft:replaceable</code> ===
Allows the block to be replaced when another block is placed in its position, like [[Minecraft:short grass]].
Allows the block to be replaced when another block is placed in its position, like short grass.
This component is specified as an empty object.
This component is specified as an empty object.


Line 806: Line 806:
This component can be defined in two ways.
This component can be defined in two ways.


* '''As a boolean ({{cd|true}} or {{cd|false}}) value:'''
* '''As a boolean ({{MC/Cd|true}} or {{MC/Cd|false}}) value:'''


A value of {{cd|true}} creates the default full block selection box.
A value of {{MC/Cd|true}} creates the default full block selection box.
A value of {{cd|false}} makes the block not selectable by players.
A value of {{MC/Cd|false}} makes the block not selectable by players.


Example:
Example:
Line 821: Line 821:
Fields:
Fields:


* '''{{cd|origin}}''':
* '''{{MC/Cd|origin}}''':
** The origin of the selection box. (0,0,0) represents the bottom center of the block.
** The origin of the selection box. (0,0,0) represents the bottom center of the block.
* '''{{cd|size}}''':
* '''{{MC/Cd|size}}''':
** The size of the selection box. The total size of the selection box may not be larger than 16&times;16&times;16.
** The size of the selection box. The total size of the selection box may not be larger than 16&times;16&times;16.


Line 837: Line 837:
=== <code>minecraft:support</code> ===
=== <code>minecraft:support</code> ===


Defines the shape of the block with regards to how it can support other blocks like [[Minecraft:torches]]. This component cannot be used in permutations.
Defines the shape of the block with regards to how it can support other blocks like torches. This component cannot be used in permutations.


Structure:
Structure:


<div class="treeview">
<div class="treeview">
* {{nbt|compound|minecraft:support}}: The component root.
* {{MC/Nbt|compound|minecraft:support}}: The component root.
** {{nbt|string|shape}}: The support shape of the block. If the component is omitted, the default is unit cube (all sides give support).
** {{MC/Nbt|string|shape}}: The support shape of the block. If the component is omitted, the default is unit cube (all sides give support).
*** <code>stair</code>: Uses the shape of a [[Minecraft:stair]] (bottom and back give support). This requires the <code>minecraft:vertical_half</code> [[Minecraft:block state]], and either state from the <code>minecraft:placement_direction</code> [[Minecraft:block trait]].
*** <code>stair</code>: Uses the shape of a stair (bottom and back give support). This requires the <code>minecraft:vertical_half</code> block state, and either state from the <code>minecraft:placement_direction</code> block trait.
*** <code>fence</code>: Uses the shape of a [[Minecraft:fence]] (bottom and top give support).
*** <code>fence</code>: Uses the shape of a [[Minecraft:fence]] (bottom and top give support).
</div>
</div>
Line 857: Line 857:


=== <code>minecraft:tags</code> ===
=== <code>minecraft:tags</code> ===
{{In development|be||26.20|section=1}}
{{MC/In development|be||26.20|section=1}}


Defines the block's [[Minecraft:Block tag (Bedrock Edition)|tags]]. Tags are used to categorize blocks and allow them to work better with vanilla blocks and items. Both vanilla and custom block tags can be added. This component is defined as an array.
Defines the block's [[Minecraft:Block tag (Bedrock Edition)|tags]]. Tags are used to categorize blocks and allow them to work better with vanilla blocks and items. Both vanilla and custom block tags can be added. This component is defined as an array.
Line 864: Line 864:


<div class="treeview">
<div class="treeview">
* {{nbt|list|minecraft:tags}}: The list of tags for this block.
* {{MC/Nbt|list|minecraft:tags}}: The list of tags for this block.
</div>
</div>


Line 880: Line 880:


<div class="treeview">
<div class="treeview">
* {{nbt|compound|minecraft:tick}}: The component root.
* {{MC/Nbt|compound|minecraft:tick}}: The component root.
** {{nbt|list|interval_range}}: The minimum and maximum possible time between block ticks. The time values are specified in ticks.
** {{MC/Nbt|list|interval_range}}: The minimum and maximum possible time between block ticks. The time values are specified in ticks.
** {{nbt|boolean|looping}}: ''Optional.'' Whether the block should continue to tick after the first tick.
** {{MC/Nbt|boolean|looping}}: ''Optional.'' Whether the block should continue to tick after the first tick.
</div>
</div>


Line 901: Line 901:


<div class="treeview">
<div class="treeview">
* {{nbt|compound|minecraft:transformation}}: The component root.
* {{MC/Nbt|compound|minecraft:transformation}}: The component root.
** {{nbt|list|rotation}}: ''Optional.'' The rotation values around each axis.
** {{MC/Nbt|list|rotation}}: ''Optional.'' The rotation values around each axis.
** {{nbt|list|rotation_pivot}}: ''Optional.'' The point to apply rotation around. Defaults to the center of the block.
** {{MC/Nbt|list|rotation_pivot}}: ''Optional.'' The point to apply rotation around. Defaults to the center of the block.
** {{nbt|list|scale}}: ''Optional.'' The scale amount for each axis.
** {{MC/Nbt|list|scale}}: ''Optional.'' The scale amount for each axis.
** {{nbt|list|scale_pivot}}: ''Optional.'' The point to apply scaling around. Defaults to the center of the block.
** {{MC/Nbt|list|scale_pivot}}: ''Optional.'' The point to apply scaling around. Defaults to the center of the block.
** {{nbt|list|translation}}: ''Optional.'' The distance on each axis to translate the block's geometry.
** {{MC/Nbt|list|translation}}: ''Optional.'' The distance on each axis to translate the block's geometry.
</div>
</div>


Line 919: Line 919:
== Custom components ==
== Custom components ==


Custom block components allow for custom blocks to take advantage of [[Minecraft:script API]] capabilities. Custom components are registered in scripts using the method {{cd|StartupEvent.blockComponentRegistry.registerCustomComponent()}}.
Custom block components allow for custom blocks to take advantage of script API capabilities. Custom components are registered in scripts using the method {{MC/Cd|StartupEvent.blockComponentRegistry.registerCustomComponent()}}.


Custom components can be added to blocks the same way as any other component, using the namespaced [[Minecraft:identifier]] the component was registered with. Custom components can have arguments of any type, which will be passed to scripts as the second argument.
Custom components can be added to blocks the same way as any other component, using the namespaced [[Minecraft:identifier]] the component was registered with. Custom components can have arguments of any type, which will be passed to scripts as the second argument.
Line 936: Line 936:
In scripts, the custom component object can have methods added to listen to any amount of the following events<ref>{{cite|url=https://learn.microsoft.com/en-us/minecraft/creator/scriptapi/minecraft/server/blockcustomcomponent?view=minecraft-bedrock-stable|title=minecraft/server.BlockCustomComponent Interface|website=Microsoft Learn|date=December 3, 2025}}</ref>:
In scripts, the custom component object can have methods added to listen to any amount of the following events<ref>{{cite|url=https://learn.microsoft.com/en-us/minecraft/creator/scriptapi/minecraft/server/blockcustomcomponent?view=minecraft-bedrock-stable|title=minecraft/server.BlockCustomComponent Interface|website=Microsoft Learn|date=December 3, 2025}}</ref>:


* {{cd|beforeOnPlayerPlace}}: Called before the player places the block.
* {{MC/Cd|beforeOnPlayerPlace}}: Called before the player places the block.
* {{cd|onBlockStateChange}}: Called when an block has its state changed.{{upcoming|BE 26.20}}{{OnlyExperimental|Beta APIs}}
* {{MC/Cd|onBlockStateChange}}: Called when an block has its state changed.{{MC/Upcoming|BE 26.20}}{{OnlyExperimental|Beta APIs}}
* {{cd|onBreak}}: Called when the block is [[Minecraft:destroyed]].
* {{MC/Cd|onBreak}}: Called when the block is destroyed.
* {{cd|onEntity}}: Called when an entity sends an event to the block.
* {{MC/Cd|onEntity}}: Called when an entity sends an event to the block.
* {{cd|onEntityFallOn}}: Called when an entity falls onto the block. This requires the [[#minecraft:entity_fall_on|{{cd|minecraft:entity_fall_on}}]] component.
* {{MC/Cd|onEntityFallOn}}: Called when an entity falls onto the block. This requires the [[#minecraft:entity_fall_on|{{MC/Cd|minecraft:entity_fall_on}}]] component.
* {{cd|onPlace}}: Called when the block is placed.
* {{MC/Cd|onPlace}}: Called when the block is placed.
* {{cd|onPlayerBreak}}: Called when the block is destroyed by a player.
* {{MC/Cd|onPlayerBreak}}: Called when the block is destroyed by a player.
* {{cd|onPlayerInteract}}: Called when a player interacts with the block.
* {{MC/Cd|onPlayerInteract}}: Called when a player interacts with the block.
* {{cd|onRandomTick}}: Called when the block is [[Minecraft:Random tick|randomly ticked]].
* {{MC/Cd|onRandomTick}}: Called when the block is randomly ticked.
* {{cd|onRedstoneUpdate}}: Called when the block receives a redstone update. This requires the [[#minecraft:redstone_consumer|{{cd|minecraft:redstone_consumer}}]] component, and will only be called if the signal power is greater than or equal to the {{cd|min_power}} set in the component.
* {{MC/Cd|onRedstoneUpdate}}: Called when the block receives a redstone update. This requires the [[#minecraft:redstone_consumer|{{MC/Cd|minecraft:redstone_consumer}}]] component, and will only be called if the signal power is greater than or equal to the {{MC/Cd|min_power}} set in the component.
* {{cd|onStepOff}}: Called when an entity steps off the block.
* {{MC/Cd|onStepOff}}: Called when an entity steps off the block.
* {{cd|onStepOn}}: Called when an entity steps on to the block.
* {{MC/Cd|onStepOn}}: Called when an entity steps on to the block.
* {{cd|onTick}}: Called when the block ticks (As specified by the [[#minecraft:tick|{{cd|minecraft:tick}}]] component).
* {{MC/Cd|onTick}}: Called when the block ticks (As specified by the [[#minecraft:tick|{{MC/Cd|minecraft:tick}}]] component).


== History ==
== History ==
{{Missing information|section|Information about many components.}}
{{MC/Missing information|section|Information about many components.}}
{{HistoryTable
{{HistoryTable
|{{HistoryLine|bedrock}}
|{{MC/HistoryLine|bedrock}}
|{{HistoryLine||?|Block components were added.}}
|{{MC/HistoryLine||?|Block components were added.}}
|{{HistoryLine||1.21.50|dev=Preview 1.21.50.20|Updated [[#minecraft:destructible_by_mining|{{cd|minecraft:destructible_by_mining}}]] component, new field {{cd|item_specific_speeds}} no longer experimental.}}
|{{HistoryLine||1.21.50|dev=Preview 1.21.50.20|Updated [[#minecraft:destructible_by_mining|{{MC/Cd|minecraft:destructible_by_mining}}]] component, new field {{MC/Cd|item_specific_speeds}} no longer experimental.}}
|{{HistoryLine|||dev=Preview 1.21.50.26|Added the [[#minecraft:liquid_detection|{{cd|minecraft:liquid_detection}}]] component. The only supported liquid is {{cd|water}}.}}
|{{HistoryLine|||dev=Preview 1.21.50.26|Added the [[#minecraft:liquid_detection|{{MC/Cd|minecraft:liquid_detection}}]] component. The only supported liquid is {{MC/Cd|water}}.}}
|{{HistoryLine||1.21.50|dev=Preview 1.21.50.26|exp=Upcoming Creator Features|Added the [[#minecraft:item_visual|{{cd|minecraft:item_visual}}]] component.}}
|{{HistoryLine||1.21.50|dev=Preview 1.21.50.26|exp=Upcoming Creator Features|Added the [[#minecraft:item_visual|{{MC/Cd|minecraft:item_visual}}]] component.}}
|{{HistoryLine|||dev=Preview 1.21.50.28|Modified {{cd|ambient_occlusion}} field for [[#minecraft:material_instances|{{cd|minecraft:material_instances}}]] component to be a float value.}}
|{{HistoryLine|||dev=Preview 1.21.50.28|Modified {{MC/Cd|ambient_occlusion}} field for [[#minecraft:material_instances|{{MC/Cd|minecraft:material_instances}}]] component to be a float value.}}
|{{HistoryLine||1.21.60|dev=Preview 1.21.60.21|Removed Upcoming Creator Features experiment requirement for [[#minecraft:item_visual|{{Cd|minecraft:item_visual}}]] component.|Removed "Upcoming Creator Features" experiment requirement for the {{cd|ambient_occlusion}} field in the [[#minecraft:material_instances|{{cd|minecraft:material_instances}}]] component.}}
|{{HistoryLine||1.21.60|dev=Preview 1.21.60.21|Removed Upcoming Creator Features experiment requirement for [[#minecraft:item_visual|{{MC/Cd|minecraft:item_visual}}]] component.|Removed "Upcoming Creator Features" experiment requirement for the {{MC/Cd|ambient_occlusion}} field in the [[#minecraft:material_instances|{{MC/Cd|minecraft:material_instances}}]] component.}}
|{{HistoryLine||1.21.60|dev=Preview 1.21.60.21|exp=Upcoming Creator Features|Removing a waterlogged custom block using the [[#minecraft:liquid_detection|{{cd|minecraft:liquid_detection}}]] component with {{cd|stopsLiquidFlowingFromDirection}} enabled for all directions now results in flowing water rather than a stagnant block of water.}}
|{{HistoryLine||1.21.60|dev=Preview 1.21.60.21|exp=Upcoming Creator Features|Removing a waterlogged custom block using the [[#minecraft:liquid_detection|{{MC/Cd|minecraft:liquid_detection}}]] component with {{MC/Cd|stopsLiquidFlowingFromDirection}} enabled for all directions now results in flowing water rather than a stagnant block of water.}}
|{{HistoryLine||1.21.60|dev=Preview 1.21.60.24|[[#minecraft:liquid_detection|{{cd|minecraft:liquid_detection}}]] no longer requires the Upcoming Creator Features experiment.}}
|{{HistoryLine||1.21.60|dev=Preview 1.21.60.24|[[#minecraft:liquid_detection|{{MC/Cd|minecraft:liquid_detection}}]] no longer requires the Upcoming Creator Features experiment.}}
|{{HistoryLine||1.21.70|dev=Preview 1.21.70.20|[[#minecraft:map_color|{{cd|minecraft:map_color}}]] is now a JSON object with two fields: {{cd|color}} and {{cd|tint_method}}. The old format is still supported.|Added the [[#minecraft:replaceable|{{cd|minecraft:replaceable}}]] component.}}
|{{HistoryLine||1.21.70|dev=Preview 1.21.70.20|[[#minecraft:map_color|{{MC/Cd|minecraft:map_color}}]] is now a JSON object with two fields: {{MC/Cd|color}} and {{MC/Cd|tint_method}}. The old format is still supported.|Added the [[#minecraft:replaceable|{{MC/Cd|minecraft:replaceable}}]] component.}}
|{{HistoryLine||1.21.70|dev=Preview 1.21.70.23|exp=Upcoming Creator Features|[[#minecraft:material_instances|{{cd|minecraft:material_instances}}]] now has a new boolean field {{Cd|isotropic}}.}}
|{{HistoryLine||1.21.70|dev=Preview 1.21.70.23|exp=Upcoming Creator Features|[[#minecraft:material_instances|{{MC/Cd|minecraft:material_instances}}]] now has a new boolean field {{MC/Cd|isotropic}}.}}
|{{HistoryLine||1.21.70|dev=Preview 1.21.70.24|[[#minecraft:material_instances|{{cd|minecraft:material_instances}}]] now supports an optional {{cd|tint_method}} field.}}
|{{HistoryLine||1.21.70|dev=Preview 1.21.70.24|[[#minecraft:material_instances|{{MC/Cd|minecraft:material_instances}}]] now supports an optional {{MC/Cd|tint_method}} field.}}
|{{HistoryLine|||dev=Preview 1.21.70.25|Added [[#minecraft:destruction_particles|{{cd|minecraft:destruction_particles}}]].|Added the {{Cd|dry_foliage}} tint method.}}
|{{HistoryLine|||dev=Preview 1.21.70.25|Added [[#minecraft:destruction_particles|{{MC/Cd|minecraft:destruction_particles}}]].|Added the {{MC/Cd|dry_foliage}} tint method.}}
|{{HistoryLine||1.21.80|dev=Preview 1.21.80.21|exp=Upcoming Creator Features|The texture field in [[#minecraft:destruction_particles|{{cd|minecraft:destruction_particles}}]] is now optional; if not provided or empty, it will be populated from the Material Instances component.}}
|{{HistoryLine||1.21.80|dev=Preview 1.21.80.21|exp=Upcoming Creator Features|The texture field in [[#minecraft:destruction_particles|{{MC/Cd|minecraft:destruction_particles}}]] is now optional; if not provided or empty, it will be populated from the Material Instances component.}}
|{{HistoryLine||1.21.80|dev=Preview 1.21.80.22|Removed Upcoming Creator Features experiment requirement for field {{cd|isotropic}} in [[#minecraft:material_instances|{{cd|minecraft:material_instances}}]] component.|From 1.21.80 onward, when using a [[#minecraft:geometry|{{cd|minecraft:geometry}}]] component or [[#minecraft:material_instances|{{cd|minecraft:material_instances}}]] component, you must include both.}}
|{{HistoryLine||1.21.80|dev=Preview 1.21.80.22|Removed Upcoming Creator Features experiment requirement for field {{MC/Cd|isotropic}} in [[#minecraft:material_instances|{{MC/Cd|minecraft:material_instances}}]] component.|From 1.21.80 onward, when using a [[#minecraft:geometry|{{MC/Cd|minecraft:geometry}}]] component or [[#minecraft:material_instances|{{MC/Cd|minecraft:material_instances}}]] component, you must include both.}}
|{{HistoryLine|||dev=Preview 1.21.80.25|Added {{cd|blend_to_opaque|alpha_test_to_opaque|alpha_test_single_sided_to_opaque|d=and}} {{cd|render_method}} types to [[#minecraft:material_instances|{{cd|minecraft:material_instances}}]].|The field {{cd|tint_method}} in the {{cd|minecraft:map_color|minecraft:destruction_particles|minecraft:material_instances|d=and}} components no longer require the "upcoming creator feeatures" toggle.}}
|{{HistoryLine|||dev=Preview 1.21.80.25|Added {{MC/Cd|blend_to_opaque|alpha_test_to_opaque|alpha_test_single_sided_to_opaque|d=and}} {{MC/Cd|render_method}} types to [[#minecraft:material_instances|{{MC/Cd|minecraft:material_instances}}]].|The field {{MC/Cd|tint_method}} in the {{MC/Cd|minecraft:map_color|minecraft:destruction_particles|minecraft:material_instances|d=and}} components no longer require the "upcoming creator feeatures" toggle.}}
|{{HistoryLine||1.21.90|dev=Preview 1.21.90.20|Removed component {{cd|minecraft:custom_components}} now replaced by custom component V2 in JSON versions 1.21.90 and higher.|Updated [[#minecraft:material_instances|{{cd|minecraft:material_instances}}]]
|{{HistoryLine||1.21.90|dev=Preview 1.21.90.20|Removed component {{MC/Cd|minecraft:custom_components}} now replaced by custom component V2 in JSON versions 1.21.90 and higher.|Updated [[#minecraft:material_instances|{{MC/Cd|minecraft:material_instances}}]]
Updated the {{cd|*}} instance to be optional.}}
Updated the {{MC/Cd|*}} instance to be optional.}}
|{{HistoryLine||1.21.90|dev=Preview 1.21.90.21|exp=Upcoming Creator Features|Added field {{cd|uv_lock}} to [[#minecraft:geometry|{{cd|minecraft:geometry}}]] block component behind Upcoming Creator Features experiment.|Updated [[#minecraft:destruction_particles|{{cd|minecraft:destruction_particles}}]] added {{cd|particle_count}} parameter which determines how many particles are created when the block is destroyed (0-255).}}
|{{HistoryLine||1.21.90|dev=Preview 1.21.90.21|exp=Upcoming Creator Features|Added field {{MC/Cd|uv_lock}} to [[#minecraft:geometry|{{MC/Cd|minecraft:geometry}}]] block component behind Upcoming Creator Features experiment.|Updated [[#minecraft:destruction_particles|{{MC/Cd|minecraft:destruction_particles}}]] added {{MC/Cd|particle_count}} parameter which determines how many particles are created when the block is destroyed (0-255).}}
|{{HistoryLine|||dev=Preview 1.21.90.23|Added [[#minecraft:random_offset|{{cd|minecraft:random_offset}}]] component under the Upcoming Creator Features toggle. This allows for blocks to randomly offset like foliage does in the Vanilla game.}}
|{{HistoryLine|||dev=Preview 1.21.90.23|Added [[#minecraft:random_offset|{{MC/Cd|minecraft:random_offset}}]] component under the Upcoming Creator Features toggle. This allows for blocks to randomly offset like foliage does in the Vanilla game.}}
|{{HistoryLine||1.21.90|dev=Preview 1.21.90.25|Updated [[#minecraft:geometry|{{cd|minecraft:geometry}}]], released {{cd|culling_layer}} parameter from experimental.|UV locking will not be supported if Block Json {{cd|format_version}} is less than {{cd|1.19.80}}.}}
|{{HistoryLine||1.21.90|dev=Preview 1.21.90.25|Updated [[#minecraft:geometry|{{MC/Cd|minecraft:geometry}}]], released {{MC/Cd|culling_layer}} parameter from experimental.|UV locking will not be supported if Block Json {{MC/Cd|format_version}} is less than {{MC/Cd|1.19.80}}.}}
|{{HistoryLine||1.21.90|dev=Preview 1.21.90.26|exp=Upcoming Creator Features|Added [[#minecraft:movable|{{cd|minecraft:movable}}]] component under the "Upcoming Creator Features" toggle. This allows for blocks to configure how they should react when moved by a [[Minecraft:piston]].}}
|{{HistoryLine||1.21.90|dev=Preview 1.21.90.26|exp=Upcoming Creator Features|Added [[#minecraft:movable|{{MC/Cd|minecraft:movable}}]] component under the "Upcoming Creator Features" toggle. This allows for blocks to configure how they should react when moved by a [[Minecraft:piston]].}}
|{{HistoryLine||1.21.90|dev=Preview 1.21.90.27|The render methods {{cd|alpha_test_to_opaque|alpha_test_single_sided_to_opaque|blend_to_opaque|d=and}} will not shift to opaque in the distance.}}
|{{HistoryLine||1.21.90|dev=Preview 1.21.90.27|The render methods {{MC/Cd|alpha_test_to_opaque|alpha_test_single_sided_to_opaque|blend_to_opaque|d=and}} will not shift to opaque in the distance.}}
|{{HistoryLine||1.21.100|dev= Preview 1.21.100.20|The field {{cd|uv_lock}} in the component [[#minecraft:geometry|{{cd|minecraft:geometry}}]] no longer requires experiment in format version of 1.19.80 or higher.}}
|{{HistoryLine||1.21.100|dev= Preview 1.21.100.20|The field {{MC/Cd|uv_lock}} in the component [[#minecraft:geometry|{{MC/Cd|minecraft:geometry}}]] no longer requires experiment in format version of 1.19.80 or higher.}}
|{{HistoryLine|||dev=Preview 1.21.100.21|Field {{cd|uv_lock}} in the component [[#minecraft:geometry|{{cd|minecraft:geometry}}]] now requires format version of 1.21.90 or higher.|{{cd|alpha_test_to_opaque|alpha_test_single_sided_to_opaque|blend_to_opaque|d=and}} will now shift to {{cd|opaque}} in the distance again when used as render method in [[#minecraft:material_instances|{{cd|minecraft:material_instances}}]].|The component [[#minecraft:movable|{{cd|minecraft:movable}}]] no longer requires experiment.}}
|{{HistoryLine|||dev=Preview 1.21.100.21|Field {{MC/Cd|uv_lock}} in the component [[#minecraft:geometry|{{MC/Cd|minecraft:geometry}}]] now requires format version of 1.21.90 or higher.|{{MC/Cd|alpha_test_to_opaque|alpha_test_single_sided_to_opaque|blend_to_opaque|d=and}} will now shift to {{MC/Cd|opaque}} in the distance again when used as render method in [[#minecraft:material_instances|{{MC/Cd|minecraft:material_instances}}]].|The component [[#minecraft:movable|{{MC/Cd|minecraft:movable}}]] no longer requires experiment.}}
|{{HistoryLine|||dev=Preview 1.21.100.22|Released the component [[#minecraft:random_offset|{{cd|minecraft:random_offset}}]] from experimental for block format versions 1.21.100 or higher.}}
|{{HistoryLine|||dev=Preview 1.21.100.22|Released the component [[#minecraft:random_offset|{{MC/Cd|minecraft:random_offset}}]] from experimental for block format versions 1.21.100 or higher.}}
|{{HistoryLine|||dev=Preview 1.21.100.23|Released {{cd|particle_count}} parameter in component [[#minecraft:destruction_particles|{{cd|minecraft:destruction_particles}}]] from experimental.}}
|{{HistoryLine|||dev=Preview 1.21.100.23|Released {{MC/Cd|particle_count}} parameter in component [[#minecraft:destruction_particles|{{MC/Cd|minecraft:destruction_particles}}]] from experimental.}}
|{{HistoryLine||1.21.111|dev= Preview 1.21.110.25|exp=Upcoming Creator Features|Added components {{cd|minecraft:redstone_producer|minecraft:flower_pottable|minecraft:embedded_visual|d=and}}.|Modified [[#minecraft:material_instances|{{cd|minecraft:material_instances}}]] to support weighted texture variations.}}  
|{{HistoryLine||1.21.111|dev= Preview 1.21.110.25|exp=Upcoming Creator Features|Added components {{MC/Cd|minecraft:redstone_producer|minecraft:flower_pottable|minecraft:embedded_visual|d=and}}.|Modified [[#minecraft:material_instances|{{MC/Cd|minecraft:material_instances}}]] to support weighted texture variations.}}  
|{{HistoryLine||1.21.120|dev=Preview 1.21.120.20|exp=Upcoming Creator Features|Allow items referencing a pottable block in their [[Minecraft:item components#minecraft:block_placer|{{cd|minecraft:block_placer}}]] component to be pottable when {{cd|replace_block_item}} is true.}}
|{{HistoryLine||1.21.120|dev=Preview 1.21.120.20|exp=Upcoming Creator Features|Allow items referencing a pottable block in their [[Minecraft:item components#minecraft:block_placer|{{MC/Cd|minecraft:block_placer}}]] component to be pottable when {{MC/Cd|replace_block_item}} is true.}}
|{{HistoryLine|||dev=Preview 1.21.120.22|Added [[#minecraft:precipitation_interactions|{{cd|minecraft:precipitation_interactions}}]] component. This component allows creators to determine whether a block should obstruct precipitation or not.}}
|{{HistoryLine|||dev=Preview 1.21.120.22|Added [[#minecraft:precipitation_interactions|{{MC/Cd|minecraft:precipitation_interactions}}]] component. This component allows creators to determine whether a block should obstruct precipitation or not.}}
|{{HistoryLine|||dev=Preview 1.21.120.23|Added {{cd|emissive}} field to [[#minecraft:material_instances|{{cd|minecraft:material_instances}}]] component.}}
|{{HistoryLine|||dev=Preview 1.21.120.23|Added {{MC/Cd|emissive}} field to [[#minecraft:material_instances|{{MC/Cd|minecraft:material_instances}}]] component.}}
|{{HistoryLine|||dev=Preview 1.21.120.24|Added boolean field {{cd|alpha_masked_tint}} to materials in [[#minecraft:material_instances|{{cd|minecraft:material_instances}}]] component.}}
|{{HistoryLine|||dev=Preview 1.21.120.24|Added boolean field {{MC/Cd|alpha_masked_tint}} to materials in [[#minecraft:material_instances|{{MC/Cd|minecraft:material_instances}}]] component.}}
|{{HistoryLine||1.21.120|dev=Preview 1.21.120.24|Removed Upcoming Creator Features toggle requirement from the {{cd|minecraft:redstone_producer|minecraft:embedded_visual|minecraft:flower_pottable|d=and}}.}}
|{{HistoryLine||1.21.120|dev=Preview 1.21.120.24|Removed Upcoming Creator Features toggle requirement from the {{MC/Cd|minecraft:redstone_producer|minecraft:embedded_visual|minecraft:flower_pottable|d=and}}.}}
|{{HistoryLine||1.21.130|dev=Preview 1.21.130.20|exp=Upcoming Creator Features|Added component [[#minecraft:support|{{cd|minecraft:support}}]] which allows you to specify which faces of the block can support blocks such as the [[Minecraft:torch]].}}
|{{HistoryLine||1.21.130|dev=Preview 1.21.130.20|exp=Upcoming Creator Features|Added component [[#minecraft:support|{{MC/Cd|minecraft:support}}]] which allows you to specify which faces of the block can support blocks such as the [[Minecraft:torch]].}}
|{{HistoryLine|||dev=Preview 1.21.130.22|The option {{cd|alpha_masked_tint}} in [[#minecraft:material_instances|{{cd|minecraft:material_instances}}]] now requires the Upcoming Creator Features toggle again.|Added component [[#minecraft:connection_rule|{{cd|minecraft:connection_rule}}]] behind the Upcoming Creator Features toggle, which allows custom blocks to define whether other blocks with connection behavior like a [[Minecraft:fence]].|Modified [[#minecraft:material_instances|{{cd|minecraft:material_instances}}]] component field {{cd|emissive}} renamed to {{cd|shaded}} to better describe what the field does and released field {{cd|shaded}}, from experimental.}}
|{{HistoryLine|||dev=Preview 1.21.130.22|The option {{MC/Cd|alpha_masked_tint}} in [[#minecraft:material_instances|{{MC/Cd|minecraft:material_instances}}]] now requires the Upcoming Creator Features toggle again.|Added component [[#minecraft:connection_rule|{{MC/Cd|minecraft:connection_rule}}]] behind the Upcoming Creator Features toggle, which allows custom blocks to define whether other blocks with connection behavior like a [[Minecraft:fence]].|Modified [[#minecraft:material_instances|{{MC/Cd|minecraft:material_instances}}]] component field {{MC/Cd|emissive}} renamed to {{MC/Cd|shaded}} to better describe what the field does and released field {{MC/Cd|shaded}}, from experimental.}}
|{{HistoryLine||1.21.130|dev=Preview 1.21.130.26|Moved the [[#minecraft:precipitation_interactions|{{cd|minecraft:precipitation_interactions}}]] component from experimental to stable.}}
|{{HistoryLine||1.21.130|dev=Preview 1.21.130.26|Moved the [[#minecraft:precipitation_interactions|{{MC/Cd|minecraft:precipitation_interactions}}]] component from experimental to stable.}}
|{{HistoryLine||1.21.130|dev=Preview 1.21.130.26|exp=Upcoming Creator Features|Extended [[#minecraft:collision_box|{{cd|minecraft:collision_box}}]] height to 24 and added support for arrays of boxes when using a format version of 1.21.130 or higher and the Upcoming Creator Features toggle is enabled.}}
|{{HistoryLine||1.21.130|dev=Preview 1.21.130.26|exp=Upcoming Creator Features|Extended [[#minecraft:collision_box|{{MC/Cd|minecraft:collision_box}}]] height to 24 and added support for arrays of boxes when using a format version of 1.21.130 or higher and the Upcoming Creator Features toggle is enabled.}}
|{{HistoryLine|||dev=Preview 1.21.130.27|In [[#minecraft:material_instances|{{cd|minecraft:material_instances}}]] removed redundant experimental field {{cd|shaded}}.|Added [[#minecraft:redstone_consumer|{{cd|minecraft:redstone_consumer}}]] and [[#minecraft:leashable|{{cd|minecraft:leashable}}]] components behind the Upcoming Creator Features experiment.}}
|{{HistoryLine|||dev=Preview 1.21.130.27|In [[#minecraft:material_instances|{{MC/Cd|minecraft:material_instances}}]] removed redundant experimental field {{MC/Cd|shaded}}.|Added [[#minecraft:redstone_consumer|{{MC/Cd|minecraft:redstone_consumer}}]] and [[#minecraft:leashable|{{MC/Cd|minecraft:leashable}}]] components behind the Upcoming Creator Features experiment.}}
|{{HistoryLine||26.0|dev=Preview 26.0.23|Added {{cd|use_liquid_clipping}} field to the {{cd|detection_rules}} in [[#minecraft:liquid_detection|{{cd|minecraft:liquid_detection}}]] a boolean field that indicates whether water will pass through the block or not, like a [[Minecraft:stair]].|Updated [[#minecraft:redstone_consumer|{{cd|minecraft:redstone_consumer}}]] renamed field {{cd|propogates_power}} to {{cd|propagates_power}} and release for format version 1.26.0 and higher.|The option {{cd|alpha_masked_tint}} in [[#minecraft:material_instances|{{cd|minecraft:material_instances}}]] no longer requires "Upcoming Creator Features".}}
|{{HistoryLine||26.0|dev=Preview 26.0.23|Added {{MC/Cd|use_liquid_clipping}} field to the {{MC/Cd|detection_rules}} in [[#minecraft:liquid_detection|{{MC/Cd|minecraft:liquid_detection}}]] a boolean field that indicates whether water will pass through the block or not, like a stair.|Updated [[#minecraft:redstone_consumer|{{MC/Cd|minecraft:redstone_consumer}}]] renamed field {{MC/Cd|propogates_power}} to {{MC/Cd|propagates_power}} and release for format version 1.26.0 and higher.|The option {{MC/Cd|alpha_masked_tint}} in [[#minecraft:material_instances|{{MC/Cd|minecraft:material_instances}}]] no longer requires "Upcoming Creator Features".}}
|{{HistoryLine|||dev=Preview 26.0.25|The components {{cd|minecraft:connection_rule|minecraft:support|minecraft:leashable|d=and}} can be used with format version 1.26.0 and higher without the "Upcoming Creator Features" toggle.}}
|{{HistoryLine|||dev=Preview 26.0.25|The components {{MC/Cd|minecraft:connection_rule|minecraft:support|minecraft:leashable|d=and}} can be used with format version 1.26.0 and higher without the "Upcoming Creator Features" toggle.}}
|{{HistoryLine|||dev=Preview 26.0.27|Added block permutation component validation for [[#minecraft:geometry|{{cd|minecraft:geometry}}]] and [[#minecraft:material_instances|{{cd|minecraft:material_instances}}]]. If you add one, you need to add the other.|Rotated the down face of the {{cd|minecraft:geometry.full_block}} model by 180 degrees. The old behavior is still accessible with older {{cd|format_version}}s or the {{cd|minecraft:geometry.full_block_v1}} model.|The [[#minecraft:collision_box|{{cd|minecraft:collision_box}}]] improvements no longer require the "Upcoming Creator Features" experiment.}}
|{{HistoryLine|||dev=Preview 26.0.27|Added block permutation component validation for [[#minecraft:geometry|{{MC/Cd|minecraft:geometry}}]] and [[#minecraft:material_instances|{{MC/Cd|minecraft:material_instances}}]]. If you add one, you need to add the other.|Rotated the down face of the {{MC/Cd|minecraft:geometry.full_block}} model by 180 degrees. The old behavior is still accessible with older {{MC/Cd|format_version}}s or the {{MC/Cd|minecraft:geometry.full_block_v1}} model.|The [[#minecraft:collision_box|{{MC/Cd|minecraft:collision_box}}]] improvements no longer require the "Upcoming Creator Features" experiment.}}
|{{HistoryLine|||dev=Preview 26.0.29|Removed block permutation component validation for [[#minecraft:geometry|{{cd|minecraft:geometry}}]] and [[#minecraft:material_instances|{{cd|minecraft:material_instances}}]] components.}}
|{{HistoryLine|||dev=Preview 26.0.29|Removed block permutation component validation for [[#minecraft:geometry|{{MC/Cd|minecraft:geometry}}]] and [[#minecraft:material_instances|{{MC/Cd|minecraft:material_instances}}]] components.}}
|{{HistoryLine||26.10|dev=Preview 26.10.20|exp=Experimental Voxel Shape Features|Added {{cd|culling_shape}} field to the [[#minecraft:geometry|{{cd|minecraft:geometry}}]] component.}}
|{{HistoryLine||26.10|dev=Preview 26.10.20|exp=Experimental Voxel Shape Features|Added {{MC/Cd|culling_shape}} field to the [[#minecraft:geometry|{{MC/Cd|minecraft:geometry}}]] component.}}
|{{HistoryLine|||dev=Preview 26.10.23|Experiment active in preview that may utilize the modern parsing pipeline. There are some breaking changes that may affect loading of block json with format version 26.10. Many block components have become more restricted and will miss the block if something that shouldn't happen occurs.|The format {{cd|"tag:tag_name":<nowiki>{}</nowiki>}} has been removed, and replaced by the component [[#minecraft:tags|{{cd|minecraft:tags}}]], despite being mentioned as a replacement, the new format doesn't work, only the old one.}}
|{{HistoryLine|||dev=Preview 26.10.23|Experiment active in preview that may utilize the modern parsing pipeline. There are some breaking changes that may affect loading of block json with format version 26.10. Many block components have become more restricted and will miss the block if something that shouldn't happen occurs.|The format {{cd|"tag:tag_name":<nowiki>{}</nowiki>}} has been removed, and replaced by the component [[#minecraft:tags|{{MC/Cd|minecraft:tags}}]], despite being mentioned as a replacement, the new format doesn't work, only the old one.}}
|{{HistoryLine|||dev=Preview 26.10.25|Experiment disabled, and all changes have been disabled, including restricted components and the {{cd|minecraft:tags}} component.}}
|{{HistoryLine|||dev=Preview 26.10.25|Experiment disabled, and all changes have been disabled, including restricted components and the {{MC/Cd|minecraft:tags}} component.}}
|{{HistoryLine||26.10|dev=Preview 26.10.25|exp=Upcoming Creator Features|If trait [[Minecraft:Block definition#minecraft:multi_block| {{cd|minecraft:multi_block}}]] is defined, the components [[#minecraft:movable|{{cd|minecraft:movable}}]] and [[#minecraft:placement_filter|{{cd|minecraft:placement_filter}}]] cannot be used in permutations, and movable will have some excluded types.|Added [[#minecraft:chest_obstruction|{{cd|minecraft:chest_obstruction}}]] component it defines how a block placed above a [[Minecraft:chest]] or [[Minecraft:ender chest]] should obstruct their opening.}}
|{{HistoryLine||26.10|dev=Preview 26.10.25|exp=Upcoming Creator Features|If trait [[Minecraft:Block definition#minecraft:multi_block| {{MC/Cd|minecraft:multi_block}}]] is defined, the components [[#minecraft:movable|{{MC/Cd|minecraft:movable}}]] and [[#minecraft:placement_filter|{{MC/Cd|minecraft:placement_filter}}]] cannot be used in permutations, and movable will have some excluded types.|Added [[#minecraft:chest_obstruction|{{MC/Cd|minecraft:chest_obstruction}}]] component it defines how a block placed above a [[Minecraft:chest]] or ender chest should obstruct their opening.}}
|{{HistoryLine|upcoming bedrock}}
|{{MC/HistoryLine|upcoming bedrock}}
|{{HistoryLine||26.20|dev=Preview 26.20.20|[[Minecraft:Block tag (Bedrock Edition)|Block tags]] are no longer allowed as {{cd|"tag:tag_name":<nowiki>{}</nowiki>}} objects in the components list. Instead, they must be specified in the [[#minecraft:tags|{{cd|minecraft:tags}}]] array component. Many block components have become more restricted. However, in practice, all the changes were not implemented despite being mentioned as having been added.|Fixed y-offset for [[#minecraft:flower_pottable|{{cd|minecraft:flower_pottable}}]] blocks in flower pots to match vanilla for format version 1.26.20+.|For {{cd|format_version}} 1.26.20+ the component [[#minecraft:redstone_producer|{{cd|minecraft:redstone_producer}}]] cannot be defined in the permutations array without defining it in the base components object as well.|Fixed [[#minecraft:placement_filter|{{cd|minecraft:placement_filter}}]] for blocks with trait [[Minecraft:Block definition#minecraft:multi_block|{{cd|minecraft:multi_block}}]] however, the block will not be destroyed when the base is broken.|[[#Custom components|Custom components]] no longer work due to a bug.<ref>{{Bug|MCPE-237057||An error is incorrectly thrown when using custom components}}</ref>}}
|{{HistoryLine||26.20|dev=Preview 26.20.20|[[Minecraft:Block tag (Bedrock Edition)|Block tags]] are no longer allowed as {{cd|"tag:tag_name":<nowiki>{}</nowiki>}} objects in the components list. Instead, they must be specified in the [[#minecraft:tags|{{MC/Cd|minecraft:tags}}]] array component. Many block components have become more restricted. However, in practice, all the changes were not implemented despite being mentioned as having been added.|Fixed y-offset for [[#minecraft:flower_pottable|{{MC/Cd|minecraft:flower_pottable}}]] blocks in flower pots to match vanilla for format version 1.26.20+.|For {{MC/Cd|format_version}} 1.26.20+ the component [[#minecraft:redstone_producer|{{MC/Cd|minecraft:redstone_producer}}]] cannot be defined in the permutations array without defining it in the base components object as well.|Fixed [[#minecraft:placement_filter|{{MC/Cd|minecraft:placement_filter}}]] for blocks with trait [[Minecraft:Block definition#minecraft:multi_block|{{MC/Cd|minecraft:multi_block}}]] however, the block will not be destroyed when the base is broken.|[[#Custom components|Custom components]] no longer work due to a bug.<ref>{{Bug|MCPE-237057||An error is incorrectly thrown when using custom components}}</ref>}}
|{{HistoryLine|||dev=Preview 26.20.21|[[Minecraft:Block tag (Bedrock Edition)|Block tags]] are no longer allowed as {{cd|"tag:tag_name":<nowiki>{}</nowiki>}} objects in the components list as it should. The component [[#minecraft:tags|{{cd|minecraft:tags}}]] is now being used. All restrictions are now in place as they should be in format version 1.26.20.|[[#minecraft:material_instances|{{cd|ambient_occlusion}}]] no longer supports {{cd|true|false|d=and}} values in the format version 1.26.20 only numerical values.}}
|{{HistoryLine|||dev=Preview 26.20.21|[[Minecraft:Block tag (Bedrock Edition)|Block tags]] are no longer allowed as {{cd|"tag:tag_name":<nowiki>{}</nowiki>}} objects in the components list as it should. The component [[#minecraft:tags|{{MC/Cd|minecraft:tags}}]] is now being used. All restrictions are now in place as they should be in format version 1.26.20.|[[#minecraft:material_instances|{{MC/Cd|ambient_occlusion}}]] no longer supports {{MC/Cd|true|false|d=and}} values in the format version 1.26.20 only numerical values.}}
|{{HistoryLine||26.20|dev=Preview 26.20.22|exp=Upcoming Creator Features|Added {{cd|snow_log_no_collision}} behavior to {{cd|precipitation_behavior}} in [[#minecraft:precipitation_interactions|{{cd|minecraft:precipitation_interactions}}]] component.}}
|{{HistoryLine||26.20|dev=Preview 26.20.22|exp=Upcoming Creator Features|Added {{MC/Cd|snow_log_no_collision}} behavior to {{MC/Cd|precipitation_behavior}} in [[#minecraft:precipitation_interactions|{{MC/Cd|minecraft:precipitation_interactions}}]] component.}}
|{{HistoryLine||26.20|dev=Preview 26.20.23|[[#Custom components|Custom components]] now parse properly with the modern block definition loader.}}
|{{MC/HistoryLine||26.20|dev=Preview 26.20.23|[[#Custom components|Custom components]] now parse properly with the modern block definition loader.}}
|{{HistoryLine|||dev=Preview 26.20.26|The [[#minecraft:chest_obstruction|{{cd|minecraft:chest_obstruction}}]] component no longer requires the "Upcoming Creator Features" experiment.}}
|{{HistoryLine|||dev=Preview 26.20.26|The [[#minecraft:chest_obstruction|{{MC/Cd|minecraft:chest_obstruction}}]] component no longer requires the "Upcoming Creator Features" experiment.}}
}}
}}


== References ==
== References ==
{{Reflist}}
{{MC/Reflist}}


== External links ==
== External links ==
Line 1,016: Line 1,016:


== Navigation ==
== Navigation ==
{{Navbox Bedrock Edition}}
{{MC/Navbox Bedrock Edition}}


[[Category:Development]]
[[Category:Development]]

Latest revision as of 19:54, 9 April 2026

Template:Hatnote Script error: No such module "Exclusive". Block components are Minecraft:JSON objects that are added to a custom Minecraft:block definition in a Minecraft:behavior pack to customize the Minecraft:block's behavior and visuals.

  1. redirect Template:TOC

Applying

Block components can be applied by adding them to

  1. REDIRECT Template:Code

Template:Redr within

  1. REDIRECT Template:Code

Template:Redr in the block's definition file.

Components can also be found in a

  1. REDIRECT Template:Code

Template:Redr object located in objects within the

  1. REDIRECT Template:Code

Template:Redr array. This can be used to make a component only active when the permutation's

  1. REDIRECT Template:Code

Template:Redr evaluates to

  1. REDIRECT Template:Code

Template:Redr.

Tags

Template:Message box Template:Article other

Tags are used to categorize blocks and allow them to work better with vanilla blocks and items. Both vanilla and custom block tags can be added. Tags are added with other components, as an empty object with the format: "tag:<tag_name>": {}

Example: <syntaxhighlight lang=json copy> "tag:minecraft:is_pickaxe_item_destructible": {} </syntaxhighlight>

Permutations

Permutations are used to make some block components active only under certain conditions. Permutations are defined in the

  1. REDIRECT Template:Code

Template:Redr array within

  1. REDIRECT Template:Code

Template:Redr, and consist of two properties:

  • Template:Nbt/sprite condition: A molang expression resolving to a boolean, representing when the permutation's components should be active. This is most often a block state query. For example:

<syntaxhighlight lang=json copy> "condition": "query.block_state('minecraft:cardinal_direction') == 'north'"</syntaxhighlight>

Example:

<syntaxhighlight lang=json copy> "permutations": [

 {
   "condition": "query.block_state('minecraft:vertical_half') == 'top'",
   "components": {
     "minecraft:collision_box": {
       "origin": [-8,8,-8],
       "size": [16,8,16]
     }
   }
 },
 {
   "condition": "query.block_state('minecraft:vertical_half') == 'bottom'",
   "components": {
     "minecraft:collision_box": {
       "origin": [-8,0,-8],
       "size": [16,8,16]
     }
   }
 }

] </syntaxhighlight>

Components list

minecraft:chest_obstruction

Template:Message boxTemplate:Article other Defines how the block should obstruct Minecraft:chests from opening when placed above one.

Structure:

  • Template:Nbt/sprite minecraft:chest_obstruction: The component root.
    • Template:Nbt/sprite obstruction_rule: Optional. How the block is evaluated during chest opening if the block is placed above the chest. Defaults to shape. Valid values are:
      • always: The block will always obstruct a chest from opening.
      • never: The block will never obstruct a chest from opening.
      • shape: The block's AABB shape is used to determine if a chest is obstructed from opening.

Example:

<syntaxhighlight lang=json copy> "minecraft:chest_obstruction": {

 "obstruction_rule": "always"

} </syntaxhighlight>

minecraft:collision_box

Defines the block's collision box. This component can be specified in 3 ways.

  • As a single
  1. REDIRECT Template:Code

Template:Redr or

  1. REDIRECT Template:Code

Template:Redr value:

Example:

<syntaxhighlight lang=json copy> "minecraft:collision_box": true </syntaxhighlight>

  • As a JSON object:

Fields:

  1. REDIRECT Template:Code

Template:Redr:

    • The origin of the collision box. (0,0,0) represents the bottom center of the block.
  1. REDIRECT Template:Code

Template:Redr:

    • The size of the collision box. The total size of the collision box may not be larger than 16×24×16.

Example (Bottom half slab collision):

<syntaxhighlight lang=json copy> "minecraft:collision_box": {

 "origin": [-8,0,-8],
 "size": [16,8,16]

} </syntaxhighlight>

  • As a JSON array:

The array consists of the above object, allowing for the definition of multiple collision boxes.

Example:

<syntaxhighlight lang=json copy> "minecraft:collision_box": [

 {
   "origin": [-8,0,-8],
   "size": [16,8,16]
 },
 {
   "origin": [-8,8,-8],
   "size": [16,8,8]
 }

] </syntaxhighlight>

minecraft:connection_rule

Defines which blocks this block can connect to with the

  1. REDIRECT Template:Code

Template:Redr block trait.

Fields:

  1. REDIRECT Template:Code

Template:Redr:

    • Optional. Which blocks this block can connect to. If omitted, the block accepts connections from all blocks. Allowed values are
  1. REDIRECT Template:Code

Template:Redr.

  1. REDIRECT Template:Code

Template:Redr:

    • Optional. Enables connection in only certain directions, disabling others; available values are
  1. REDIRECT Template:Code

Template:Redr,

  1. REDIRECT Template:Code

Template:Redr,

  1. REDIRECT Template:Code

Template:Redr, and

  1. REDIRECT Template:Code

Template:Redr.

Example: <syntaxhighlight lang=json copy> "minecraft:connection_rule": {

 "accepts_connections_from": "only_fences",
 "enabled_directions": ["north", "south", "east"]

} </syntaxhighlight>

minecraft:crafting_table

Gives a custom block the functionality of a crafting table.

Fields:

  1. REDIRECT Template:Code

Template:Redr:

    • An array of recipe tags that this block should be able to craft. There can be at most 64 tags, and each tag can be at most 64 characters.
    • The default tag for vanilla crafting recipes is
  1. REDIRECT Template:Code

Template:Redr, and custom tags can be specified to allow crafting of recipes with that tag in their definition.

  1. REDIRECT Template:Code

Template:Redr:

    • The name to display in the crafting table UI. Specified as a localization string, or will resort to a regular string if it can't be resolved.

Example:

<syntaxhighlight lang=json copy> "minecraft:crafting_table": {

 "crafting_tags": [
   "crafting_table",
   "custom_crafting_table"
 ],
 "table_name": "Custom Crafting Table"

} </syntaxhighlight>

minecraft:destructible_by_explosion

Defines whether the block can be destroyed by explosions, and sets its blast resistance. This component can be defined in two ways.

  • As a boolean (
  1. REDIRECT Template:Code

Template:Redr or

  1. REDIRECT Template:Code

Template:Redr) value:

Example:

<syntaxhighlight lang=json copy> "minecraft:destructible_by_explosion": false </syntaxhighlight>

  • As a JSON object:

Fields:

  1. REDIRECT Template:Code

Template:Redr:

    • Sets the block's resistance to explosions.
    • Note that the actual blast resistance value of the block is 1/5 of the value set here.

Example (Blast resistance 6, similar to Minecraft:cobblestone):

<syntaxhighlight lang=json copy> "minecraft:destructible_by_explosion": {

 "explosion_resistance": 30

} </syntaxhighlight>

minecraft:destructible_by_mining

Defines whether the block can be mined and sets its hardness. This component can be defined in two ways.

As a boolean (

  1. REDIRECT Template:Code

Template:Redr or

  1. REDIRECT Template:Code

Template:Redr) value:

A value of

  1. REDIRECT Template:Code

Template:Redr makes the block destructible in 0 seconds, making it able to be instant mined. A value of

  1. REDIRECT Template:Code

Template:Redr makes the block indestructible by mining.

Example:

<syntaxhighlight lang=json copy> "minecraft:destructible_by_mining": true </syntaxhighlight>

As a JSON object:

Structure:

Fields:

  1. REDIRECT Template:Code

Template:Redr: The amount of time it takes to destroy the block. Note that this sets the block's hardness value, not the actual seconds to destroy!

  1. REDIRECT Template:Code

Template:Redr: Optional. Specific breaking speed values for each item, it is recommended to use tags because manually defining items can make the list unnecessarily long and remove compatibility with the enchantment Efficiency. Example: <syntaxhighlight lang=json copy> "minecraft:destructible_by_mining": {

 "item_specific_speeds": [
   {
     "item": {
       "tags": "q.all_tags('minecraft:is_pickaxe') && q.any_tag('minecraft:diamond_tier','minecraft:netherite_tier')"
     },
     "destroy_speed": 30
   },
   {
     "item": "minecraft:iron_axe",
     "destroy_speed": 13
   }
 ],
 "seconds_to_destroy": 100

} </syntaxhighlight>

minecraft:destruction_particles

Configures the destruction particles created when the block is destroyed.

Fields:

  1. REDIRECT Template:Code

Template:Redr:

    • Optional. Sets the number of particles created when the block destroyed. Default is
  1. REDIRECT Template:Code

Template:Redr, maximum is

  1. REDIRECT Template:Code

Template:Redr.

  1. REDIRECT Template:Code

Template:Redr:

    • Optional. The texture to use for the particles. This is a texture name defined in
  1. REDIRECT Template:Code

Template:Redr. Defaults to the texture of the

  1. REDIRECT Template:Code

Template:Redr material instance.

  1. REDIRECT Template:Code

Template:Redr:

    • Optional. The method with which the particles are tinted. Default is
  1. REDIRECT Template:Code

Template:Redr.

    • Can be
  1. REDIRECT Template:Code

Template:Redr.

Example:

<syntaxhighlight lang=json copy> "minecraft:destruction_particles": {

 "particle_count": 255,
 "texture": "cobblestone",
 "tint_method": "none"

} </syntaxhighlight>

minecraft:display_name

Sets the display name of the block. If omitted, the default display name is "tile.<block identifier>.name". The name given will try be resolved as a localization string. If it cannot be resolved, it will show as given.

This component is specified as a string.

Example:

<syntaxhighlight lang=json copy> "minecraft:display_name": "tile.wiki:custom_block.name" </syntaxhighlight>

minecraft:embedded_visual

Sets the visuals of the block when it is embedded, such as in a flowerpot. This component can not be specified in entries in the

  1. REDIRECT Template:Code

Template:Redr array.

Fields:

  1. REDIRECT Template:Code

Template:Redr:

    • A [[#minecraft:geometry|
  1. REDIRECT Template:Code

Template:Redr]] component defining the embedded geometry.

  1. REDIRECT Template:Code

Template:Redr:

    • A [[#minecraft:material_instances|
  1. REDIRECT Template:Code

Template:Redr]] component defining the embedded material.

Example:

<syntaxhighlight lang=json copy> "minecraft:embedded_visual": {

 "geometry": "minecraft:geometry.full_block",
 "material_instances": {
   "*": {
     "texture": "cobblestone"
   }
 }

} </syntaxhighlight>

minecraft:entity_fall_on

Configures the fall distance required to trigger the

  1. REDIRECT Template:Code

Template:Redr custom component script event. The distance defaults to 1 block if omitted.

Fields:

  1. REDIRECT Template:Code

Template:Redr:

    • The distance an entity must fall to trigger the event.

Example:

<syntaxhighlight lang=json copy> "minecraft:entity_fall_on": {

 "min_fall_distance": 2

} </syntaxhighlight>

minecraft:flammable

Defines how flammable the block is, in this case, all blocks with this component will burn from fire and lava, unlike vanilla where some blocks do not burn from lava. This component can be defined in two ways.

  • As a boolean (
  1. REDIRECT Template:Code

Template:Redr or

  1. REDIRECT Template:Code

Template:Redr) property:

If

  1. REDIRECT Template:Code

Template:Redr, the block can catch fire from nearby blocks. The chance modifier for catching fire is automatically set to 5, and the chance modifier for the block being destroyed by fire is set to 20.

If

  1. REDIRECT Template:Code

Template:Redr (or omitted) the block will only catch fire if directly ignited.

Example:

<syntaxhighlight lang=json copy> "minecraft:flammable": true </syntaxhighlight>

  • As a JSON object:

Fields:

  1. REDIRECT Template:Code

Template:Redr:

    • Optional. The chance that the block catches fire from a nearby block. Default is 5.
    • If greater than 0, fire on the block will burn until it is destroyed or the fire is put out. If
  1. REDIRECT Template:Code

Template:Redr is 0, the block will burn forever.

    • If 0 the block will eventually burn out (if it isn't destroyed).
  1. REDIRECT Template:Code

Template:Redr:

    • Optional. The chance the block is destroyed while on fire. Default is 20.
    • If 0, the block will not be destroyed by fire.

Example:

<syntaxhighlight lang=json copy> "minecraft:flammable": {

 "catch_chance_modifier": 5,
 "destroy_chance_modifier": 20

} </syntaxhighlight>

minecraft:flower_pottable

Indicates that this block can be placed inside a flower pot. The geometry of the block while inside a flower pot is specified by [[#minecraft:geometry|

  1. REDIRECT Template:Code

Template:Redr]] by default, but it can be changed with [[#minecraft:embedded_visual|

  1. REDIRECT Template:Code

Template:Redr]]. This component is specified as an empty object, and can not be specified in an entry to the

  1. REDIRECT Template:Code

Template:Redr array.

Example:

<syntaxhighlight lang=json copy> "minecraft:flower_pottable": {} </syntaxhighlight>

minecraft:friction

Describes the block's friction. This component is specified as a decimal number between

  1. REDIRECT Template:Code

Template:Redr and

  1. REDIRECT Template:Code

Template:Redr.

Example:

<syntaxhighlight lang=json copy> "minecraft:friction": 0.4 </syntaxhighlight>

minecraft:geometry

Defines the geometry of the block. There are three vanilla models that can be used:

  1. REDIRECT Template:Code

Template:Redr. You can also use your own model from a resource pack. This component must be included with [[#minecraft:material_instances|

  1. REDIRECT Template:Code

Template:Redr]]. This component can be specified in two ways.

  • As a string:

The identifier of the model for the block.

Example:

<syntaxhighlight lang=json copy> "minecraft:geometry": "minecraft:geometry.full_block" </syntaxhighlight>

  • As a JSON object:

Fields:

  1. REDIRECT Template:Code

Template:Redr:

    • Optional. Defines the visibility of each bone. All bones are visible by default.
    • A key-value map of bone names from the model to Minecraft:molang expressions that result in boolean values.
  1. REDIRECT Template:Code

Template:Redr:

    • Optional. An identifier of a culling definition.
  1. REDIRECT Template:Code

Template:Redr:

    • Optional. A string to group multiple blocks when comparing them in a culling rule. Default is
  1. REDIRECT Template:Code

Template:Redr but there is also

  1. REDIRECT Template:Code

Template:Redr as vanilla.

  1. REDIRECT Template:Code

Template:Redr:Template:OnlyExperimental

    • Optional. An identifier of a voxel shape definition.
    • Vanilla shapes are
  1. REDIRECT Template:Code

Template:Redr.

  1. REDIRECT Template:Code

Template:Redr:

    • The identifier of the block model to use.
  1. REDIRECT Template:Code

Template:Redr:

    • Optional. Sets whether UVs should be locked to their original rotations, regardless of the [[#minecraft:transformation|
  1. REDIRECT Template:Code

Template:Redr]] component.

    • Can be an array of bone names to lock,
  1. REDIRECT Template:Code

Template:Redr (default) which locks none, or

  1. REDIRECT Template:Code

Template:Redr which locks all bones.

Example:

<syntaxhighlight lang=json copy> "minecraft:geometry": {

 "identifier": "geometry.some_model",
 "culling": "wiki:culling.example_block",
 "culling_layer": "minecraft:culling_layer.leaves",
 "bone_visibility": {
   "north_top": false,
   "right_corner": "q.block_state('wiki:corner') == 'right'"
 },
 "uv_lock": ["bottom"]

} </syntaxhighlight>

minecraft:item_visual

Defines the visuals of the block's item form.

Fields:

  1. REDIRECT Template:Code

Template:Redr:

    • A [[#minecraft:geometry|
  1. REDIRECT Template:Code

Template:Redr]] component defining the geometry of the block item.

  1. REDIRECT Template:Code

Template:Redr:

    • A [[#minecraft:material_instances|
  1. REDIRECT Template:Code

Template:Redr]] component defining the material of the block item.

Example:

<syntaxhighlight lang=json copy> "minecraft:item_visual": {

 "geometry": "minecraft:geometry.full_block",
 "material_instances": {
   "*": {
     "texture": "cobblestone"
   }
 }

} </syntaxhighlight>

minecraft:leashable

Allows a Minecraft:lead to be attached to the block like a Minecraft:fence and specifies an offset for the leash knot's location.

Fields:

  • offset:
    • A Vector3 property (array of three numbers [x, y, z]) that sets the position of the leash knot. [0, 0, 0] represents the bottom center of the block.

Example:

<syntaxhighlight lang=json copy> "minecraft:leashable": {

 "offset": [0, 8, 0]

} </syntaxhighlight>

minecraft:light_dampening

Sets the number of light levels that will be dampened by the block. This component is specified as an integer between 0 and 15, where 15 blocks all light.

Example:

<syntaxhighlight lang=json copy> "minecraft:light_dampening": 15 </syntaxhighlight>

minecraft:light_emission

Sets the light level emitted by the block. This component is specified as an integer between 0 and 15.

Example:

<syntaxhighlight lang=json copy> "minecraft:light_emission": 14 </syntaxhighlight>

minecraft:liquid_detection

Defines how the block responds to liquids.

Structure:

  1. REDIRECT Template:Code

Template:Redr or

  1. REDIRECT Template:Code

Template:Redr whether the liquid can occupy the same space as the block. In other words, can it be waterlogged?

        • Template:Nbt/sprite liquid_type: The type of liquid this rule applies to. Currently, the only available value is
  1. REDIRECT Template:Code

Template:Redr.

        • Template:Nbt/sprite on_liquid_touches: Optional. Sets what happens when liquid touches the block. Available values are:
  1. REDIRECT Template:Code

Template:Redr: Default. The block stops liquid from flowing through it.

  1. REDIRECT Template:Code

Template:Redr: The block is destroyed on contact with flowing liquid.

  1. REDIRECT Template:Code

Template:Redr: The block breaks and drops its loot on contact with flowing liquid.

  1. REDIRECT Template:Code

Template:Redr: Liquids flow through the block as if it is not there.

        • Template:Nbt/sprite stops_liquid_flowing_from_direction: Optional. An array of directions from which liquid can not flow out of (or in to, if
  1. REDIRECT Template:Code

Template:Redr is set to

  1. REDIRECT Template:Code

Template:Redr) the block.

  1. REDIRECT Template:Code

Template:Redr means the block will use the [[#minecraft:collision_box|

  1. REDIRECT Template:Code

Template:Redr]] to visually clip the water like the Minecraft:stairs,

  1. REDIRECT Template:Code

Template:Redr ignores liquid clipping, which will render water across the whole block how current behavior.

Example:

<syntaxhighlight lang=json copy> "minecraft:liquid_detection": {

 "detection_rules": [
   {
     "liquid_type": "water",
     "can_contain_liquid": false,
     "on_liquid_touches": "popped",
     "use_liquid_clipping": true
   }
 ]

} </syntaxhighlight>

minecraft:loot

Defines the block's loot table. This component is defined as a string path to the loot table. This component is completely ignored if the block is broken with an item enchanted by Minecraft:Silk Touch, resulting in the block dropping itself.

Example: <syntaxhighlight lang=json copy> "minecraft:loot": "loot_tables/blocks/some_block.json" </syntaxhighlight>

minecraft:map_color

Sets the block's color when seen on a Minecraft:map. This component can be defined in three ways.

  • As a string:

The hex color value to use for the block's color on a map.

Example:

<syntaxhighlight lang=json copy> "minecraft:map_color": "#7A4F0C" </syntaxhighlight>

  • As an array:

An array of three values between 0 and 255, representing the red, green, and blue color values respectively.

Example:

<syntaxhighlight lang=json copy> "minecraft:map_color": [50,205,25] </syntaxhighlight>

  • As a JSON object:

Fields:

  1. REDIRECT Template:Code

Template:Redr:

    • The color to use on the map.
    • This is specified as an RGB array, or an hex string, as described above.
  1. REDIRECT Template:Code

Template:Redr:

    • Optional. The method to use to tint the color based on the Minecraft:biome. Available values are
  1. REDIRECT Template:Code

Template:Redr.

Example:

<syntaxhighlight lang=json copy> "minecraft:map_color": {

 "color": "#FEFEFE",
 "tint_method": "grass"

} </syntaxhighlight>

minecraft:material_instances

Defines the materials and textures of the block. This component must be included with [[#minecraft:geometry|

  1. REDIRECT Template:Code

Template:Redr]].

Structure:

  • Template:Nbt/sprite minecraft:material_instances: The component root.
    • Template:Nbt/spriteTemplate:Nbt: A material instance definition, or the name of a material instance. The name of the property can be the name of a block face, a "*" to map to all block faces, or a custom name to define a material instance.
  1. REDIRECT Template:Code

Template:Redr: Default. Non-transparent texture, viewable from the full render distance.

  1. REDIRECT Template:Code

Template:Redr: Allows for transparent textures, but disables backface culling, and can only be viewed from half the render distance.

  1. REDIRECT Template:Code

Template:Redr: Like

  1. REDIRECT Template:Code

Template:Redr, but reenables backface culling. Also can only be viewed from half the render distance.

  1. REDIRECT Template:Code

Template:Redr: Allows for texture translucency, but disables backface culling.

  1. REDIRECT Template:Code

Template:Redr: Like

  1. REDIRECT Template:Code

Template:Redr, but disables backface culling.

  1. REDIRECT Template:Code

Template:Redr:

  1. REDIRECT Template:Code

Template:Redr, but past half the render distance it shifts to

  1. REDIRECT Template:Code

Template:Redr, like Minecraft:leaves.

  1. REDIRECT Template:Code

Template:Redr:

  1. REDIRECT Template:Code

Template:Redr, but past half the render distance it shifts to

  1. REDIRECT Template:Code

Template:Redr.

  1. REDIRECT Template:Code

Template:Redr:

  1. REDIRECT Template:Code

Template:Redr, but past half the render distance it shifts to

  1. REDIRECT Template:Code

Template:Redr.

      • Template:Nbt/sprite texture: Defines the texture for the material instance. This is the name of a texture defined within
  1. REDIRECT Template:Code

Template:Redr.

      • Template:Nbt/sprite tint_method: Optional. Sets the method with which to tint the texture based on the biome. Available values are
  1. REDIRECT Template:Code

Template:Redr.

Example:

<syntaxhighlight lang=json copy> "minecraft:material_instances": {

 "*": {
   "isotropic": true,
   "render_method": "opaque",
   "texture": "cobblestone"
 }

} </syntaxhighlight>

minecraft:movable

Determines the block's behavior when being pushed or pulled by a Minecraft:piston. If trait [[Minecraft:Block definition#minecraft:multi_block|

  1. REDIRECT Template:Code

Template:Redr]] is defined, the component cannot be used in permutations, and the only available

  1. REDIRECT Template:Code

Template:Redr are

  1. REDIRECT Template:Code

Template:Redr.

Fields:

  1. REDIRECT Template:Code

Template:Redr:

    • How the block will react to a piston.
    • Can be
  1. REDIRECT Template:Code

Template:Redr.

  1. REDIRECT Template:Code

Template:Redr:

    • Optional. Whether or not the block affects nearby blocks when pushed or pulled, allowing behavior similar to slime or honey blocks.
    • Can be
  1. REDIRECT Template:Code

Template:Redr. Default is

  1. REDIRECT Template:Code

Template:Redr.

Example:

<syntaxhighlight lang=json copy> "minecraft:movable": {

 "movement_type": "popped"

} </syntaxhighlight>

minecraft:placement_filter

Defines the conditions in which the block can survive. If the conditions are not met, the block can not be placed, and if it already exists, it will break and drop itself. If trait [[Minecraft:Block definition#minecraft:multi_block|

  1. REDIRECT Template:Code

Template:Redr]] is defined, the component it cannot be used in permutations.

Structure:

  1. REDIRECT Template:Code

Template:Redr for all faces.

Example:

<syntaxhighlight lang=json copy> "minecraft:placement_filter": {

 "conditions": [
   {

"allowed_faces": ["up","down"], "block_filter": [ { "tags": "q.any_tag('stone')" } ] }

 ]

} </syntaxhighlight>

minecraft:precipitation_interactions

Defines how the block is affected by precipitation. If the block has [[#minecraft:collision_box|

  1. REDIRECT Template:Code

Template:Redr]] that is not false, it will not be possible to use

  1. REDIRECT Template:Code

Template:Redr.

Structure:

  1. REDIRECT Template:Code

Template:Redr: Default. Rain particles will land on the block, and snow layers will accumulate if it is snowing.

  1. REDIRECT Template:Code

Template:Redr: Rain particles will land on the block, but snow will not accumulate.

  1. REDIRECT Template:Code

Template:Redr: Rain and snow will pass through the block.

  1. REDIRECT Template:Code

Template:Redr:​{{#vardefine: $version | be 26.20 }}{{#vardefine: $version2 | }}<upcoming: Template:Version link & Template:Version link></upcoming: Template:Version link & Template:Version link>Template:OnlyExperimental Snow will accumulate inside the block if it is snowing, causing it to become snowlogged.

Example:

<syntaxhighlight lang=json copy> "minecraft:precipitation_interactions": {

 "precipitation_behavior": "obstruct_rain"

} </syntaxhighlight>

minecraft:random_offset

Allows the block's model to be randomly offset, similar to short grass. The chosen offset is still subject to the block model limits. Due to current limitations, this component causes the block to be shadowed if it intersects another block.

Structure:

  1. REDIRECT Template:Code

Template:Redr).

Example:

<syntaxhighlight lang=json copy> "minecraft:random_offset": {

 "x": {
   "steps": 0,
   "range": {
     "max": 5,
     "min": -5
   }
 },
 "y": {
   "steps": 4,
   "range": {
     "max": 2,
     "min": -1
   }
 },
 "z": {
   "steps": 0,
   "range": {
     "max": 5,
     "min": -5
   }
 }

} </syntaxhighlight>

minecraft:redstone_conductivity

Defines how the block conducts redstone power.

Structure:

  • Template:Nbt/sprite minecraft:redstone_conductivity: The component root.
    • Template:Nbt/sprite allows_wire_to_step_down: Optional. Sets whether redstone wire can step down the side of this block.
    • Template:Nbt/sprite redstone_conductor: Optional. Sets whether the block conducts redstone.

Example:

<syntaxhighlight lang=json copy> "minecraft:redstone_conductivity": {

 "allows_wire_to_step_down": false,
 "redstone_conductor": false

} </syntaxhighlight>

minecraft:redstone_consumer

Allows the block to consume a redstone signal, sending the

  1. REDIRECT Template:Code

Template:Redr custom component event to scripts when the power changes.

Structure:

  • Template:Nbt/sprite minecraft:redstone_consumer: The component root.
    • Template:Nbt/sprite min_power: Optional. Sets the minimum power required to trigger the script event. Must be between 0 and 15.
    • Template:Nbt/sprite propagates_power: Optional. Sets whether a redstone signal will pass through this block.

Example:

<syntaxhighlight lang=json copy> "minecraft:redstone_consumer": {

 "min_power": 0,
 "propagates_power": true

} </syntaxhighlight>

minecraft:redstone_producer

Allows the block to produce a redstone signal. If the format version is 1.26.20+, adding it to the permutation also requires adding it to the root component.

Structure:

  • Template:Nbt/sprite minecraft:redstone_producer: The component root.
    • Template:Nbt/sprite power: Sets the power level that this block produces. Must be between 0 and 15.
    • Template:Nbt/sprite strongly_powered_face: Optional. Determines the face of the block that strongly powers the block it is connected to.
    • Template:Nbt/sprite connected_faces: Optional. A list of the faces of the block that emit redstone power.
    • Template:Nbt/sprite transform_relative: Optional. Whether the faces selected should be relative to the [[#minecraft:transformation|
  1. REDIRECT Template:Code

Template:Redr]] component.

Example:

<syntaxhighlight lang=json copy> "minecraft:redstone_producer": {

 "power": 15,
 "strongly_powered_face": "up",
 "connected_faces": ["north","south"],
 "transform_relative": true

} </syntaxhighlight>

minecraft:replaceable

Allows the block to be replaced when another block is placed in its position, like short grass. This component is specified as an empty object.

Example:

<syntaxhighlight lang=json copy> "minecraft:replaceable": {} </syntaxhighlight>

minecraft:selection_box

Defines the block's selection box. This component can be defined in two ways.

  • As a boolean (
  1. REDIRECT Template:Code

Template:Redr or

  1. REDIRECT Template:Code

Template:Redr) value:

A value of

  1. REDIRECT Template:Code

Template:Redr creates the default full block selection box. A value of

  1. REDIRECT Template:Code

Template:Redr makes the block not selectable by players.

Example:

<syntaxhighlight lang=json copy> "minecraft:selection_box": true </syntaxhighlight>

  • As a JSON object:

Fields:

  1. REDIRECT Template:Code

Template:Redr:

    • The origin of the selection box. (0,0,0) represents the bottom center of the block.
  1. REDIRECT Template:Code

Template:Redr:

    • The size of the selection box. The total size of the selection box may not be larger than 16×16×16.

Example (Bottom half slab):

<syntaxhighlight lang=json copy> "minecraft:selection_box": {

 "origin": [-8,0,-8],
 "size": [16,8,16]

} </syntaxhighlight>

minecraft:support

Defines the shape of the block with regards to how it can support other blocks like torches. This component cannot be used in permutations.

Structure:

  • Template:Nbt/sprite minecraft:support: The component root.
    • Template:Nbt/sprite shape: The support shape of the block. If the component is omitted, the default is unit cube (all sides give support).
      • stair: Uses the shape of a stair (bottom and back give support). This requires the minecraft:vertical_half block state, and either state from the minecraft:placement_direction block trait.
      • fence: Uses the shape of a Minecraft:fence (bottom and top give support).

Example:

<syntaxhighlight lang=json copy> "minecraft:support": {

 "shape": "fence"

} </syntaxhighlight>

minecraft:tags

Template:Message box Template:Article other

Defines the block's tags. Tags are used to categorize blocks and allow them to work better with vanilla blocks and items. Both vanilla and custom block tags can be added. This component is defined as an array.

Structure:

Example:

<syntaxhighlight lang=json copy> "minecraft:tags": ["minecraft:is_pickaxe_item_destructible","example:custom_tag"] </syntaxhighlight>

minecraft:tick

Sets the block to tick after a certain number of ticks, which will trigger the onTick custom component event. This component is required in order to use the onTick event.

Structure:

  • Template:Nbt/sprite minecraft:tick: The component root.
    • Template:Nbt/sprite interval_range: The minimum and maximum possible time between block ticks. The time values are specified in ticks.
    • Template:Nbt/sprite looping: Optional. Whether the block should continue to tick after the first tick.

Example:

<syntaxhighlight lang=json copy> "minecraft:tick": {

 "interval_range": [20,100],
 "looping": true

} </syntaxhighlight>

minecraft:transformation

Transforms the block's geometry, collision box, and selection box. The transformations specified here are still subject to the block model limits.

Structure:

Example:

<syntaxhighlight lang=json copy> "minecraft:transformation": {

 "rotation": [0,90,0]

} </syntaxhighlight>

Custom components

Custom block components allow for custom blocks to take advantage of script API capabilities. Custom components are registered in scripts using the method

  1. REDIRECT Template:Code

Template:Redr.

Custom components can be added to blocks the same way as any other component, using the namespaced Minecraft:identifier the component was registered with. Custom components can have arguments of any type, which will be passed to scripts as the second argument.

Examples: <syntaxhighlight lang=json copy> "example_namespace:example_component": "foo", "example_namespace:example_component2": 4, "example_namespace:example_component3": [ "hello", "world" ], "example_namespace:example_component4": true, "example_namespace:example_component5": {

 "stuff": 4

} </syntaxhighlight>

In scripts, the custom component object can have methods added to listen to any amount of the following events<ref>Template:Cite</ref>:

  1. REDIRECT Template:Code

Template:Redr: Called before the player places the block.

  1. REDIRECT Template:Code

Template:Redr: Called when an block has its state changed.​{{#vardefine: $version | BE 26.20 }}{{#vardefine: $version2 | }}<upcoming: Template:Version link & Template:Version link></upcoming: Template:Version link & Template:Version link>Template:OnlyExperimental

  1. REDIRECT Template:Code

Template:Redr: Called when the block is destroyed.

  1. REDIRECT Template:Code

Template:Redr: Called when an entity sends an event to the block.

  1. REDIRECT Template:Code

Template:Redr: Called when an entity falls onto the block. This requires the [[#minecraft:entity_fall_on|

  1. REDIRECT Template:Code

Template:Redr]] component.

  1. REDIRECT Template:Code

Template:Redr: Called when the block is placed.

  1. REDIRECT Template:Code

Template:Redr: Called when the block is destroyed by a player.

  1. REDIRECT Template:Code

Template:Redr: Called when a player interacts with the block.

  1. REDIRECT Template:Code

Template:Redr: Called when the block is randomly ticked.

  1. REDIRECT Template:Code

Template:Redr: Called when the block receives a redstone update. This requires the [[#minecraft:redstone_consumer|

  1. REDIRECT Template:Code

Template:Redr]] component, and will only be called if the signal power is greater than or equal to the

  1. REDIRECT Template:Code

Template:Redr set in the component.

  1. REDIRECT Template:Code

Template:Redr: Called when an entity steps off the block.

  1. REDIRECT Template:Code

Template:Redr: Called when an entity steps on to the block.

  1. REDIRECT Template:Code

Template:Redr: Called when the block ticks (As specified by the [[#minecraft:tick|

  1. REDIRECT Template:Code

Template:Redr]] component).

History

Template:Message boxTemplate:Article other Template:HistoryTable

References

<references group="">

 </references>

External links

More information about components

Navigation

Editions
Merged
Ports to consoles
Discontinued
Development
Version history
Technical
Creator
Add-ons
Multiplayer
Exclusive features
Blocks
Mobs
Effects
Unused
Removed