VOOZH about

URL: https://minecraft.wiki/w/Block_components

โ‡ฑ Block components โ€“ Minecraft Wiki


Block components

From Minecraft Wiki
Jump to navigation Jump to search
๐Ÿ‘ Image
For item components, see Item components.
This feature is exclusive to Bedrock Edition.
 

Block components are JSON objects that are added to a custom block definition in a behavior pack to customize the block's behavior and visuals.

Applying

[edit | edit source]

Block components can be applied by adding them to components within minecraft:block in the block's definition file.

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

This section describes content that has been removed and was only present in earlier versions of Minecraft.
 
This tag format has been removed and replaced by the component minecraft:tags. It cannot be used in blocks with format version 1.26.20+ only earlier versions are compatible.

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:

"tag:minecraft:is_pickaxe_item_destructible":{}

Permutations

[edit | edit source]

Permutations are used to make some block components active only under certain conditions. Permutations are defined in the permutations array within minecraft:block, and consist of two properties:

  • [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:
"condition":"query.block_state('minecraft:cardinal_direction') == 'north'"
  • [NBT Compound / JSON Object] components: The components for this permutation.

Example:

"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]
}
}
}
]

Component types

[edit | edit source]

minecraft:block_entity

[edit | edit source]
This section describes an experimental feature in Bedrock Edition.
 
This feature is not enabled in-game by default and requires enabling the "Upcoming Creator Features" setting in the "Experiments" section in Bedrock Edition.

This component is used to define whether a block has an associated block entity. This component can not be specified in entries in the permutations array.

Fields:

  • dynamic_properties:
    • Can be true or false determines whether the block entity will store properties, if true the block gains the internal component minecraft:dynamic_properties.

Example:

"minecraft:block_entity":{
"dynamic_properties":true
}

minecraft:chest_obstruction

[edit | edit source]

Defines how the block should obstruct chests from opening when placed above one.

Structure:

  • [NBT Compound / JSON Object] minecraft:chest_obstruction: The component root.
    • [String] 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:

"minecraft:chest_obstruction":{
"obstruction_rule":"always"
}

minecraft:collision_box

[edit | edit source]

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

  • As a single true or false value:

Example:

"minecraft:collision_box":true
  • As a JSON object:

Fields:

  • origin:
    • The origin of the collision box. (0,0,0) represents the bottom center of the block.
  • size:
    • 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):

"minecraft:collision_box":{
"origin":[-8,0,-8],
"size":[16,8,16]
}
  • As a JSON array:

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

Example:

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

minecraft:connection_rule

[edit | edit source]

Defines which blocks this block can connect to with the minecraft:connection block trait.

Fields:

  • accepts_connections_from:
    • Optional. Which blocks this block can connect to. If omitted, the block accepts connections from all blocks. Allowed values are all, only_fences, and none.
  • enabled_directions:
    • Optional. Enables connection in only certain directions, disabling others; available values are north, south, west, and east.

Example:

"minecraft:connection_rule":{
"accepts_connections_from":"only_fences",
"enabled_directions":["north","south","east"]
}

minecraft:crafting_table

[edit | edit source]

Gives a custom block the functionality of a crafting table.

Fields:

  • crafting_tags:
    • 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 crafting_table, and custom tags can be specified to allow crafting of recipes with that tag in their definition.
  • 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.

Example:

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

minecraft:destructible_by_explosion

[edit | edit source]

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 (true or false) value:

Example:

"minecraft:destructible_by_explosion":false
  • As a JSON object:

Fields:

  • explosion_resistance:
    • 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 cobblestone):

"minecraft:destructible_by_explosion":{
"explosion_resistance":30
}

minecraft:destructible_by_mining

[edit | edit source]

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

As a boolean (true or false) value:

A value of true makes the block destructible in 0 seconds, making it able to be instant mined. A value of false makes the block indestructible by mining.

Example:

"minecraft:destructible_by_mining":true

As a JSON object:

Structure:

  • [NBT Compound / JSON Object] minecraft:destructible_by_mining: (root of component)
    • [NBT List / JSON Array] item_specific_speeds
      • [NBT Compound / JSON Object] An item:
        • [Int] destroy_speed: The hardness of the block when mined with the target item(s).
        • [String][NBT Compound / JSON Object] item: A description of the item(s). Either a string item identifier or an object.
          • [String] tags: A Molang expression defining the tags of the target item(s).
    • [Int] seconds_to_destroy

Fields:

  • 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!
  • 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:

"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
}

minecraft:destruction_particles

[edit | edit source]

Configures the destruction particles created when the block is destroyed.

Fields:

  • particle_count:
    • Optional. Sets the number of particles created when the block destroyed. Default is 100, maximum is 255.
  • texture:
    • Optional. The texture to use for the particles. This is a texture name defined in terrain_texture.json. Defaults to the texture of the down material instance.
  • tint_method:
    • Optional. The method with which the particles are tinted. Default is none.
    • Can be none, default_foliage, birch_foliage, evergreen_foliage, dry_foliage, grass, or water.

Example:

"minecraft:destruction_particles":{
"particle_count":255,
"texture":"cobblestone",
"tint_method":"none"
}

minecraft:display_name

[edit | edit source]

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:

"minecraft:display_name":"tile.wiki:custom_block.name"

minecraft:embedded_visual

[edit | edit source]

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

Fields:

Example:

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

minecraft:entity_fall_on

[edit | edit source]

Configures the fall distance required to trigger the onEntityFallOn custom component script event. The distance defaults to 1 block if omitted.

Fields:

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

Example:

"minecraft:entity_fall_on":{
"min_fall_distance":2
}

minecraft:flammable

[edit | edit source]

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 (true or false) property:

If 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 false (or omitted) the block will only catch fire if directly ignited.

Example:

"minecraft:flammable":true
  • As a JSON object:

Fields:

  • catch_chance_modifier:
    • 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 destroy_chance_modifier is 0, the block will burn forever.
    • If 0 the block will eventually burn out (if it isn't destroyed).
  • destroy_change_modifier:
    • Optional. The chance the block is destroyed while on fire. Default is 20.
    • If 0, the block will not be destroyed by fire.
  • lava_flammable:
    • Optional. Can be always and never.
    • when always the block always burns like lava when never it never burns like small flowers.

Example:

"minecraft:flammable":{
"catch_chance_modifier":5,
"destroy_chance_modifier":20,
"lava_flammable":"always"
}

minecraft:flower_pottable

[edit | edit source]

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 by default, but it can be changed with minecraft:embedded_visual. This component is specified as an empty object, and can not be specified in an entry to the permutations array.

Example:

"minecraft:flower_pottable":{}

minecraft:friction

[edit | edit source]

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

Example:

"minecraft:friction":0.4

minecraft:geometry

[edit | edit source]

Defines the geometry of the block. There are three vanilla models that can be used: minecraft:geometry.full_block, minecraft:geometry.cross, and minecraft:geometry.full_block_v1. You can also use your own model from a resource pack. This component must be included with minecraft:material_instances. This component can be specified in two ways.

  • As a string:

The identifier of the model for the block.

Example:

"minecraft:geometry":"minecraft:geometry.full_block"
  • As a JSON object:

Fields:

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

Example:

"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"]
}

minecraft:instrument_sound

[edit | edit source]
This section describes an experimental feature in Bedrock Edition.
 
This feature is not enabled in-game by default and requires enabling the "Upcoming Creator Features" setting in the "Experiments" section in Bedrock Edition.

Defines the sound of the block's in the note block.

Fields:

  • up:
    • The sound the block makes if it's above the note block, by default note.harp.
  • down:
    • The sound the block makes if the note block is above the block, by default note.none.

Example:

"minecraft:instrument_sound":{
"up":"note.bit",
"down":"note.bell"
}

minecraft:item_visual

[edit | edit source]

Defines the visuals of the block's item form.

Fields:

Example:

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

minecraft:leashable

[edit | edit source]

Allows a lead to be attached to the block like a 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:

"minecraft:leashable":{
"offset":[0,8,0]
}

minecraft:light_dampening

[edit | edit source]

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:

"minecraft:light_dampening":15

minecraft:light_emission

[edit | edit source]

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

Example:

"minecraft:light_emission":14

minecraft:liquid_detection

[edit | edit source]

Defines how the block responds to liquids.

Structure:

  • [NBT Compound / JSON Object] minecraft:liquid_detection: The component root.
    • [NBT List / JSON Array] detection_rules: An array of liquid rules.
      • [NBT Compound / JSON Object]: A rule
        • [Boolean] can_contain_liquid: true or false whether the liquid can occupy the same space as the block. In other words, can it be waterlogged?
        • [String] liquid_type: The type of liquid this rule applies to. Currently, the only available value is water.
        • [String] on_liquid_touches: Optional. Sets what happens when liquid touches the block. Available values are:
          • blocking: Default. The block stops liquid from flowing through it.
          • broken: The block is destroyed on contact with flowing liquid.
          • popped: The block breaks and drops its loot on contact with flowing liquid.
          • no_reaction: Liquids flow through the block as if it is not there.
        • [NBT List / JSON Array] stops_liquid_flowing_from_direction: Optional. An array of directions from which liquid can not flow out of (or in to, if on_liquid_touches is set to no_reaction) the block.
        • [Boolean] use_liquid_clipping: true means the block will use the minecraft:collision_box to visually clip the water like the stairs, false ignores liquid clipping, which will render water across the whole block how current behavior.

Example:

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

minecraft:loot

[edit | edit source]

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 Silk Touch, resulting in the block dropping itself.

Example:

"minecraft:loot":"loot_tables/blocks/some_block.json"

minecraft:map_color

[edit | edit source]

Sets the block's color when seen on a 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:

"minecraft:map_color":"#7A4F0C"
  • As an array:

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

Example:

"minecraft:map_color":[50,205,25]
  • As a JSON object:

Fields:

  • color:
    • The color to use on the map.
    • This is specified as an RGB array, or an hex string, as described above.
  • tint_method:
    • Optional. The method to use to tint the color based on the biome. Available values are none, default_foliage, birch_foliage, evergreen_foliage, dry_foliage, grass, and water.

Example:

"minecraft:map_color":{
"color":"#FEFEFE",
"tint_method":"grass"
}

minecraft:material_instances

[edit | edit source]

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

Structure:

  • [NBT Compound / JSON Object] minecraft:material_instances: The component root.
    • [String][NBT Compound / JSON Object] * / <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.
      • [Float] ambient_occlusion: Optional. Whether the block should have ambient occlusion, and its intensity.
      • [Boolean] face_dimming: Optional. Sets if these faces are dimmed by their direction.
      • [Boolean] isotropic: Optional. Should the UVs for these faces be randomly rotated based on position?
      • [String] render_method: Optional. The block's render method.
        • opaque: Default. Non-transparent texture, viewable from the full render distance.
        • alpha_test: Allows for transparent textures, but disables backface culling, and can only be viewed from half the render distance.
        • alpha_test_single_sided: Like alpha_test, but reenables backface culling. Also can only be viewed from half the render distance.
        • blend: Allows for texture translucency, but disables backface culling.
        • double_sided: Like opaque, but disables backface culling.
        • alpha_test_to_opaque: alpha_test, but past half the render distance it shifts to opaque, like leaves.
        • alpha_test_single_sided_to_opaque: alpha_test_single_sided, but past half the render distance it shifts to opaque.
        • blend_to_opaque: blend, but past half the render distance it shifts to opaque.
      • [String] texture: Defines the texture for the material instance. This is the name of a texture defined within terrain_texture.json.
      • [String] tint_method: Optional. Sets the method with which to tint the texture based on the biome. Available values are none, default_foliage, birch_foliage, evergreen_foliage, dry_foliage, grass, and water.

Example:

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

minecraft:movable

[edit | edit source]

Determines the block's behavior when being pushed or pulled by a piston. If trait minecraft:multi_block is defined, the component cannot be used in permutations, and the only available movement_type are popped, and immovable.

Fields:

  • movement_type:
    • How the block will react to a piston.
    • Can be push_pull, push, popped, or immovable.
  • sticky:
    • Optional. Whether or not the block affects nearby blocks when pushed or pulled, allowing behavior similar to slime or honey blocks.
    • Can be same, or none. Default is none.

Example:

"minecraft:movable":{
"movement_type":"popped"
}

minecraft:placement_filter

[edit | edit source]

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:multi_block is defined, the component it cannot be used in permutations.

Structure:

  • [NBT Compound / JSON Object] minecraft:placement_filter: The component root.
    • [NBT List / JSON Array] conditions: A list of conditions.
      • [NBT Compound / JSON Object] A condition
        • [NBT List / JSON Array] allowed_faces: Optional. A list of allowed faces the block can be placed on, or all for all faces.
        • [NBT List / JSON Array] block_filter: Optional. A list of blocks that this block can be placed on.
          • [NBT Compound / JSON Object] A filter
            • [String] name: Optional. The block identifier.
            • [NBT Compound / JSON Object] states: Optional. A key-value map of block states to required values.
            • [String] tags: Optional. A molang expression defining the tags for the block.

Example:

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

minecraft:precipitation_interactions

[edit | edit source]

Defines how the block is affected by precipitation. If the block has minecraft:collision_box that is not false, it will not be possible to use snow_log_no_collision.

Structure:

  • [NBT Compound / JSON Object] minecraft:precipitation_interactions: The component root.
    • [String] precipitation_behavior: The block's behavior with precipitation.
      • obstruct_rain_accumulate_snow: Default. Rain particles will land on the block, and snow layers will accumulate if it is snowing.
      • obstruct_rain: Rain particles will land on the block, but snow will not accumulate.
      • none: Rain and snow will pass through the block.
      • snowlogging: Snow will accumulate inside the block if it is snowing, causing it to become snowlogged.

Example:

"minecraft:precipitation_interactions":{
"precipitation_behavior":"obstruct_rain"
}

minecraft:random_offset

[edit | edit source]

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:

  • [NBT Compound / JSON Object] minecraft:random_offset: The component root.
    • [NBT Compound / JSON Object] <axis>: The settings for the axis (x, y, or z).
      • [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 / JSON Object] range: The range of values to choose from.
        • [Float] max: The maximum possible value.
        • [Float] min: The minimun possible value.

Example:

"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
}
}
}

minecraft:redstone_conductivity

[edit | edit source]

Defines how the block conducts redstone power.

Structure:

  • [NBT Compound / JSON Object] minecraft:redstone_conductivity: The component root.
    • [Boolean] allows_wire_to_step_down: Optional. Sets whether redstone wire can step down the side of this block.
    • [Boolean] redstone_conductor: Optional. Sets whether the block conducts redstone.

Example:

"minecraft:redstone_conductivity":{
"allows_wire_to_step_down":false,
"redstone_conductor":false
}

minecraft:redstone_consumer

[edit | edit source]

Allows the block to consume a redstone signal, sending the onRedstoneUpdate custom component event to scripts when the power changes.

Structure:

  • [NBT Compound / JSON Object] minecraft:redstone_consumer: The component root.
    • [Int] min_power: Optional. Sets the minimum power required to trigger the script event. Must be between 0 and 15.
    • [Boolean] propagates_power: Optional. Sets whether a redstone signal will pass through this block.

Example:

"minecraft:redstone_consumer":{
"min_power":0,
"propagates_power":true
}

minecraft:redstone_producer

[edit | edit source]

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:

  • [NBT Compound / JSON Object] minecraft:redstone_producer: The component root.
    • [Int] power: Sets the power level that this block produces. Must be between 0 and 15.
    • [String] strongly_powered_face: Optional. Determines the face of the block that strongly powers the block it is connected to.
    • [NBT List / JSON Array] connected_faces: Optional. A list of the faces of the block that emit redstone power.
    • [Boolean] transform_relative: Optional. Whether the faces selected should be relative to the minecraft:transformation component.

Example:

"minecraft:redstone_producer":{
"power":15,
"strongly_powered_face":"up",
"connected_faces":["north","south"],
"transform_relative":true
}

minecraft:replaceable

[edit | edit source]

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:

"minecraft:replaceable":{}

minecraft:selection_box

[edit | edit source]

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

  • As a boolean (true or false) value:

A value of true creates the default full block selection box. A value of false makes the block not selectable by players.

Example:

"minecraft:selection_box":true
  • As a JSON object:

Fields:

  • origin:
    • The origin of the selection box. (0,0,0) represents the bottom center of the block.
  • size:
    • 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):

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

minecraft:support

[edit | edit source]

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:

  • [NBT Compound / JSON Object] minecraft:support: The component root.
    • [String] 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 fence (bottom and top give support).

Example:

"minecraft:support":{
"shape":"fence"
}

minecraft:tags

[edit | edit source]

Defines the block's tags available in format version 1.26.20+. 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:

  • [NBT List / JSON Array] minecraft:tags: The list of tags for this block.

Example:

"minecraft:tags":["minecraft:is_pickaxe_item_destructible","example:custom_tag"]

minecraft:tick

[edit | edit source]

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:

  • [NBT Compound / JSON Object] minecraft:tick: The component root.
    • [NBT List / JSON Array] interval_range: The minimum and maximum possible time between block ticks. The time values are specified in ticks.
    • [Boolean] looping: Optional. Whether the block should continue to tick after the first tick.

Example:

"minecraft:tick":{
"interval_range":[20,100],
"looping":true
}

minecraft:transformation

[edit | edit source]

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

Structure:

  • [NBT Compound / JSON Object] minecraft:transformation: The component root.
    • [NBT List / JSON Array] rotation: Optional. The rotation values around each axis.
    • [NBT List / JSON Array] rotation_pivot: Optional. The point to apply rotation around. Defaults to the center of the block.
    • [NBT List / JSON Array] scale: Optional. The scale amount for each axis.
    • [NBT List / JSON Array] scale_pivot: Optional. The point to apply scaling around. Defaults to the center of the block.
    • [NBT List / JSON Array] translation: Optional. The distance on each axis to translate the block's geometry.

Example:

"minecraft:transformation":{
"rotation":[0,90,0]
}

Custom components

[edit | edit source]

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

Custom components can be added to blocks the same way as any other component, using the namespaced 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:

"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
}

In scripts, the custom component object can have methods added to listen to any amount of the following events[1]:

  • beforeOnPlayerPlace: Called before the player places the block.
  • onBlockStateChange: Called when a block has its state changed.โ€Œ["Beta APIs" Experiment only]
  • onBreak: Called when the block is destroyed.
  • onEntity: Called when an entity sends an event to the block.
  • onEntityFallOn: Called when an entity falls onto the block. This requires the minecraft:entity_fall_on component.
  • onPlace: Called when the block is placed.
  • onPlayerBreak: Called when the block is destroyed by a player.
  • onPlayerInteract: Called when a player interacts with the block.
  • onRandomTick: Called when the block is randomly ticked.
  • onRedstoneUpdate: Called when the block receives a redstone update. This requires the minecraft:redstone_consumer component, and will only be called if the signal power is greater than or equal to the min_power set in the component.
  • onStepOff: Called when an entity steps off the block.
  • onStepOn: Called when an entity steps on to the block.
  • onTick: Called when the block ticks (As specified by the minecraft:tick component).

History

[edit | edit source]
This section is missing information about: Information about many components.
 
Please expand the section to include this information. Further details may exist on the talk page.
Bedrock Edition
?Block components were added.
1.21.50Preview 1.21.50.20Updated minecraft:destructible_by_mining component, new field item_specific_speeds no longer experimental.
Preview 1.21.50.26Added the minecraft:liquid_detection component. The only supported liquid is water.
1.21.50
Experiment
Upcoming Creator Features
Preview 1.21.50.26Added the minecraft:item_visual component.
Preview 1.21.50.28Modified ambient_occlusion field for minecraft:material_instances component to be a float value.
1.21.60Preview 1.21.60.21Removed Upcoming Creator Features experiment requirement for minecraft:item_visual component.
Removed "Upcoming Creator Features" experiment requirement for the ambient_occlusion field in the minecraft:material_instances component.
1.21.60
Experiment
Upcoming Creator Features
Preview 1.21.60.21Removing a waterlogged custom block using the minecraft:liquid_detection component with stopsLiquidFlowingFromDirection enabled for all directions now results in flowing water rather than a stagnant block of water.
1.21.60Preview 1.21.60.24minecraft:liquid_detection no longer requires the Upcoming Creator Features experiment.
1.21.70Preview 1.21.70.20minecraft:map_color is now a JSON object with two fields: color and tint_method. The old format is still supported.
Added the minecraft:replaceable component.
1.21.70
Experiment
Upcoming Creator Features
Preview 1.21.70.23minecraft:material_instances now has a new boolean field isotropic.
1.21.70Preview 1.21.70.24minecraft:material_instances now supports an optional tint_method field.
Preview 1.21.70.25Added minecraft:destruction_particles.
Added the dry_foliage tint method.
1.21.80
Experiment
Upcoming Creator Features
Preview 1.21.80.21The texture field in minecraft:destruction_particles is now optional; if not provided or empty, it will be populated from the Material Instances component.
1.21.80Preview 1.21.80.22Removed Upcoming Creator Features experiment requirement for field isotropic in minecraft:material_instances component.
From 1.21.80 onward, when using a minecraft:geometry component or minecraft:material_instances component, you must include both.
Preview 1.21.80.25Added blend_to_opaque, alpha_test_to_opaque, and alpha_test_single_sided_to_opaque render_method types to minecraft:material_instances.
The field tint_method in the minecraft:map_color, minecraft:destruction_particles, and minecraft:material_instances components no longer require the "upcoming creator feeatures" toggle.
1.21.90Preview 1.21.90.20Removed component minecraft:custom_components now replaced by custom component V2 in JSON versions 1.21.90 and higher.
Updated minecraft:material_instances Updated the * instance to be optional.
1.21.90
Experiment
Upcoming Creator Features
Preview 1.21.90.21Added field uv_lock to minecraft:geometry block component behind Upcoming Creator Features experiment.
Updated minecraft:destruction_particles added particle_count parameter which determines how many particles are created when the block is destroyed (0-255).
Preview 1.21.90.23Added minecraft:random_offset component under the Upcoming Creator Features toggle. This allows for blocks to randomly offset like foliage does in the Vanilla game.
1.21.90Preview 1.21.90.25Updated minecraft:geometry, released culling_layer parameter from experimental.
UV locking will not be supported if Block Json format_version is less than 1.19.80.
1.21.90
Experiment
Upcoming Creator Features
Preview 1.21.90.26Added minecraft:movable component under the "Upcoming Creator Features" toggle. This allows for blocks to configure how they should react when moved by a piston.
1.21.90Preview 1.21.90.27The render methods alpha_test_to_opaque, alpha_test_single_sided_to_opaque, and blend_to_opaque will not shift to opaque in the distance.
1.21.100Preview 1.21.100.20The field uv_lock in the component minecraft:geometry no longer requires experiment in format version of 1.19.80 or higher.
Preview 1.21.100.21Field uv_lock in the component minecraft:geometry now requires format version of 1.21.90 or higher.
alpha_test_to_opaque, alpha_test_single_sided_to_opaque, and blend_to_opaque will now shift to opaque in the distance again when used as render method in minecraft:material_instances.
The component minecraft:movable no longer requires experiment.
Preview 1.21.100.22Released the component minecraft:random_offset from experimental for block format versions 1.21.100 or higher.
Preview 1.21.100.23Released particle_count parameter in component minecraft:destruction_particles from experimental.
1.21.111
Experiment
Upcoming Creator Features
Preview 1.21.110.25Added components minecraft:redstone_producer, minecraft:flower_pottable, and minecraft:embedded_visual.
Modified minecraft:material_instances to support weighted texture variations.
1.21.120
Experiment
Upcoming Creator Features
Preview 1.21.120.20Allow items referencing a pottable block in their minecraft:block_placer component to be pottable when replace_block_item is true.
Preview 1.21.120.22Added minecraft:precipitation_interactions component. This component allows creators to determine whether a block should obstruct precipitation or not.
Preview 1.21.120.23Added emissive field to minecraft:material_instances component.
Preview 1.21.120.24Added boolean field alpha_masked_tint to materials in minecraft:material_instances component.
1.21.120Preview 1.21.120.24Removed Upcoming Creator Features toggle requirement from the minecraft:redstone_producer, minecraft:embedded_visual, and minecraft:flower_pottable.
1.21.130
Experiment
Upcoming Creator Features
Preview 1.21.130.20Added component minecraft:support which allows you to specify which faces of the block can support blocks such as the torch.
Preview 1.21.130.22The option alpha_masked_tint in minecraft:material_instances now requires the Upcoming Creator Features toggle again.
Added component minecraft:connection_rule behind the Upcoming Creator Features toggle, which allows custom blocks to define whether other blocks with connection behavior like a fence.
Modified minecraft:material_instances component field emissive renamed to shaded to better describe what the field does and released field shaded, from experimental.
1.21.130Preview 1.21.130.26Moved the minecraft:precipitation_interactions component from experimental to stable.
1.21.130
Experiment
Upcoming Creator Features
Preview 1.21.130.26Extended 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.
Preview 1.21.130.27In minecraft:material_instances removed redundant experimental field shaded.
Added minecraft:redstone_consumer and minecraft:leashable components behind the Upcoming Creator Features experiment.
26.0Preview 26.0.23Added use_liquid_clipping field to the detection_rules in minecraft:liquid_detection a boolean field that indicates whether water will pass through the block or not, like a stair.
Updated minecraft:redstone_consumer renamed field propogates_power to propagates_power and release for format version 1.26.0 and higher.
The option alpha_masked_tint in minecraft:material_instances no longer requires "Upcoming Creator Features".
Preview 26.0.25The components minecraft:connection_rule, minecraft:support, and minecraft:leashable can be used with format version 1.26.0 and higher without the "Upcoming Creator Features" toggle.
Preview 26.0.27Added block permutation component validation for minecraft:geometry and minecraft:material_instances. If you add one, you need to add the other.
Rotated the down face of the minecraft:geometry.full_block model by 180 degrees. The old behavior is still accessible with older format_versions or the minecraft:geometry.full_block_v1 model.
The minecraft:collision_box improvements no longer require the "Upcoming Creator Features" experiment.
Preview 26.0.29Removed block permutation component validation for minecraft:geometry and minecraft:material_instances components.
26.10
Experiment
Experimental Voxel Shape Features
Preview 26.10.20Added culling_shape field to the minecraft:geometry component.
Preview 26.10.23Experiment 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 "tag:tag_name":{} has been removed, and replaced by the component minecraft:tags, despite being mentioned as a replacement, the new format doesn't work, only the old one.
Preview 26.10.25Experiment disabled, and all changes have been disabled, including restricted components and the minecraft:tags component.
26.10
Experiment
Upcoming Creator Features
Preview 26.10.25If trait minecraft:multi_block is defined, the components minecraft:movable and minecraft:placement_filter cannot be used in permutations, and movable will have some excluded types.
Added minecraft:chest_obstruction component it defines how a block placed above a chest or ender chest should obstruct their opening.
26.20Preview 26.20.20Block tags are no longer allowed as "tag:tag_name":{} objects in the components list. Instead, they must be specified in the 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 blocks in flower pots to match vanilla for format version 1.26.20+.
For format_version 1.26.20+ the component minecraft:redstone_producer cannot be defined in the permutations array without defining it in the base components object as well.
Fixed minecraft:placement_filter for blocks with trait minecraft:multi_block however, the block will not be destroyed when the base is broken.
Custom components no longer work due to a bug.[2]
Preview 26.20.21Block tags are no longer allowed as "tag:tag_name":{} objects in the components list as it should. The component minecraft:tags is now being used. All restrictions are now in place as they should be in format version 1.26.20.
ambient_occlusion no longer supports true, and false values in the format version 1.26.20 only numerical values.
minecraft:flammable no longer supports the burn_odds and flame_odds fields; these fields were renamed in version 1.19.10 but were still functional previously.
26.20
Experiment
Upcoming Creator Features
Preview 26.20.22Added snow_log_no_collision behavior to precipitation_behavior in minecraft:precipitation_interactions component.
26.20Preview 26.20.23Custom components now parse properly with the modern block definition loader.
Preview 26.20.26The minecraft:chest_obstruction component no longer requires the "Upcoming Creator Features" experiment.
26.30
Experiment
Upcoming Creator Features
Preview 26.30.20Renamed field snow_log_no_collision to snowlogging in minecraft:precipitation_interactions component.
Preview 26.30.27Added the lava_flammable field to the minecraft:flammable component under Upcoming Creator Features. Supported values are always and never.
26.30Preview 26.30.27Released the culling_shape field in the minecraft:geometry component from behind the Voxel Shapes experiment. Non-unit-cube culling shapes for certain blocks (e.g. fences, bells, slabs) still require the experiment.
Released the snowlogging behavior for minecraft:precipitation_interactions component out of experimental.
26.30
Experiment
Upcoming Creator Features
Preview 26.30.28Added the minecraft:block_entity block component. It has a single boolean field dynamic_properties, when a block with a minecraft:block_entity is placed in the world, an associated block-entity will be placed with the intent.
Preview 26.30.29Added the component minecraft:instrument_sound it can be used to assign an instrument to "up" and "down" faces of a custom block, all current instruments can be used to define a sound.
26.30Preview 26.30.29The lava_flammable field of the minecraft:flammable component is now usable without the Experimental Upcoming Creator Features.

References

[edit | edit source]
  1. โ†‘ "minecraft/server.BlockCustomComponent Interface" โ€“ Microsoft Learn, December 3, 2025.
  2. โ†‘ MCPE-237057 โ€“ An error is incorrectly thrown when using custom components

External links

[edit | edit source]

More information about components

[edit | edit source]

Navigation

[edit | edit source]
Retrieved from "https://minecraft.wiki/w/Block_components?oldid=3630519"

Navigation menu