Bedrock Edition blocks documentation

This is the blocks documentation for Bedrock Edition 1.16.221.

Format Version

 * {| class="wikitable"

! Type !! Name !! Default Value !! Description
 * String
 * format_version
 * Specifies the minimum version of the game this block will register in.
 * }
 * Specifies the minimum version of the game this block will register in.
 * }

Example
{   "format_version": "1.16.221", "minecraft:block": { .......   } }

Block Description

 * {| class="wikitable"

! Type !! Name !! Default Value !! Description
 * String
 * identifier
 * The identifier for this block. The name must include a namespace and must not use the Minecraft namespace unless overriding a Vanilla block.
 * Object Array
 * properties
 * Defines an array of properties, each with integer, boolean or string iterations, which are later used to control permutations.
 * }
 * properties
 * Defines an array of properties, each with integer, boolean or string iterations, which are later used to control permutations.
 * }
 * }

Example
"minecraft:block": { "description": { "identifier": "name:block_name", "properties": [ {               "name:string_property": ["red", "green", "blue", "purple"], "name:boolean_property": [true, false], "name:interger_property": [0,1,2,3,4,5] }       ]    } }



Permutations
Permutations are collections of block components, similar to "component_groups" in entity behavior files. These are useful for building mechanics such as block rotation or variant randomization. Permutations correspond to a property value. More permutations can be active at the same time (eg. variant and rotation) by assigning them to two or more properties.


 * {| class="wikitable"

! Type !Name !Default Value!!Description
 * MoLang
 * condition
 * Defines when this permutation is active depending on queries
 * Object Array
 * components
 * List of components this permutation has
 * }
 * components
 * List of components this permutation has
 * }
 * }

Example
"minecraft:block": { "permutations":[ {           "condition": "1 && 1", "components": { ...           }        },        {            "condition": "0 || 1", "components": { ...           }        }    ] }

General Components
These are what define the block's general properties.

minecraft:loot
Defines what items the block drops when it is destroyed. If left empty, the block will drop itself.


 * {| class="wikitable"

!Type!!Name!!Default Value!!Description
 * String
 * Path of the loot table file, relative to the behavior pack folder.
 * }
 * Path of the loot table file, relative to the behavior pack folder.
 * }
 * }

Example
"minecraft:loot": "loot_tables/blocks/block_name.json"

minecraft:material_instances
Defines a block's texture and material. Essential for blocks that have a custom geometry.


 * {| class="wikitable"

!Type !Name!!List Value!!Description north,east,west,south
 * Object
 * ,top,down,side,
 * ,top,down,side,
 * {| class="wikitable"
 * {| class="wikitable"

!Name!!Type!!Default Value!!Description
 * texture
 * String
 * Defines what texture the block should have. Can be any texture name defined in your resource pack folder (textures/terrain_texture.json)
 * render_method
 * String
 * opaque
 * Defines what render method the block should use. Can be opaque, alpha_test or blend.
 * }
 * A list of bones from inside the block's geometry & what render method and texture each one should have. '*' is most commonly used as it sets values for the entire model, but there is no limit to how many bones can be defined.
 * }
 * }
 * A list of bones from inside the block's geometry & what render method and texture each one should have. '*' is most commonly used as it sets values for the entire model, but there is no limit to how many bones can be defined.
 * }

"minecraft:material_instances": { "*": {			"texture": "mytexturename", "render_method": "alpha_test" }	}
 * Example

minecraft:geometry
Defines a block's geometry. The format is the same as an entity geometry, and the file should be located in the resource pack's models folder


 * {| class="wikitable"

!Type!!Default Value!!Description
 * String
 * The identifier of a geometry defined in your resource pack folder (models folder)
 * }
 * The identifier of a geometry defined in your resource pack folder (models folder)
 * }

minecraft:rotation
Defines a block's rotation around its center axis.


 * {| class="wikitable"

! Type!!Default Value!!Description
 * Vector [a, b, c]
 * [0,0,0]
 * Rotation values in x, y, z order. Can only be -180, -90, 0, 90, 180
 * }
 * }

minecraft:entity_collision
The solid collision box of the block. Used for entity collisions.


 * {| class="wikitable"

!Type!! Name!! Default Value!!Description
 * Boolean
 * value
 * true
 * Sets whether the collision of the block with entities is active or not.
 * Vector [a, b, c]
 * origin
 * [-8,0,-8]
 * The origin from which the block collision box starts. Can be a minimum of [-8,0,-8] and a maximum of [8,16,8].
 * Vector [a, b, c]
 * size
 * [16,16,16]
 * The size of the block collision box. Can be a minimum of [0,0,0] and a maximum of [16,16,16].
 * }
 * [16,16,16]
 * The size of the block collision box. Can be a minimum of [0,0,0] and a maximum of [16,16,16].
 * }

minecraft:pick_collision
The collision box used when the block is being selected by the player.


 * {| class="wikitable"

!Type!!Name !!Default Value!!Description
 * Boolean
 * value
 * true
 * Sets whether the pick collision box is active or not.
 * Vector [a, b, c]
 * origin
 * [-8,0,-8]
 * The origin from which the collision box starts. Can be a minimum of [-8,0,-8] and a maximum of [8,16,8].
 * Vector [a, b, c]
 * size
 * [16,16,16]
 * The size of the collision box. Can be a minimum of [0,0,0] and a maximum of [16,16,16].
 * }
 * [16,16,16]
 * The size of the collision box. Can be a minimum of [0,0,0] and a maximum of [16,16,16].
 * }

minecraft:destroy_time
How long it takes a player to destroy the block in survival mode.


 * {| class="wikitable"

!Type!!Name!!Default Value!!Description
 * Decimal
 * Sets the destroy time property for the block. Greater numbers result in greater mining times.
 * }
 * Sets the destroy time property for the block. Greater numbers result in greater mining times.
 * }
 * }

minecraft:friction
Property describing the friction for this block. Friction affects an entity's movement while on the block.


 * {| class="wikitable"

!Type!!Name !!Default Value!!Description
 * Decimal
 * 0.1
 * Sets the friction property for this block. Greater values result in less friction.
 * }
 * Sets the friction property for this block. Greater values result in less friction.
 * }

minecraft:block_light_absorption
How a block absorbs light.


 * {| class="wikitable"

!Type!!Name!!Default Value!!Description
 * Interger
 * 0
 * The amount of light this block will absorb. For ice blocks, this describes at what light level the ice will melt.
 * }
 * The amount of light this block will absorb. For ice blocks, this describes at what light level the ice will melt.
 * }

minecraft:block_light_emission
Makes the block emit light.


 * {| class="wikitable"

!Type!!Name!!Default Value!!Description
 * Decimal
 * 0.0
 * The amount of light this block will emit in a range [0.0, 1.0].
 * }
 * The amount of light this block will emit in a range [0.0, 1.0].
 * }

minecraft:flammable
Describes the flammable properties for this block.


 * {| class="wikitable"

!Type!!Name!!Default Value!!Description
 * Decimal
 * flame_odds
 * 0
 * How likely the block will catch flame when next to a fire.
 * Decimal
 * burn_odds
 * 0
 * How likely the block will be destroyed by flames when on fire.
 * }
 * How likely the block will be destroyed by flames when on fire.
 * }

minecraft:map_color
Modified block colors displayed on Map and Locator Map.


 * {| class="wikitable"

!Type!! Name !!Default Value!!Description
 * String
 * color
 * A color represented as a hex value. This will be the color rendered to a map.
 * }
 * A color represented as a hex value. This will be the color rendered to a map.
 * }

minecraft:explosion_resistance
The explosion resistance property for a block.


 * {| class="wikitable"

!Type!!Name!!Default Value!! Description
 * Decimal
 * 0.0
 * Sets the explosion resistance for this block.
 * }
 * Sets the explosion resistance for this block.
 * }

minecraft:unwalkable
If the block is unwalkable most mobs will try to avoid it (similar to magma blocks, gaps in the ground).


 * {| class="wikitable"

!Type!!Name!!Default Value!!Description
 * Boolean
 * false
 * Can be either true or false
 * }
 * Can be either true or false
 * }

Trigger Components
These are components which trigger an event based on whether or not certain conditions are met.

minecraft:on_player_destroyed
Event will call if player break this block.


 * {| class="wikitable"

!Type !!Name!! Default Value !!Description
 * String
 * event
 * Any event name you defined in "events".
 * }
 * Any event name you defined in "events".
 * }

minecraft:on_placed
Event to call when the block is placed.


 * {| class="wikitable"

!Type!!Name!!Default Value !! Description
 * String
 * event
 * Any event name you defined in "events".
 * }
 * Any event name you defined in "events".
 * }

minecraft:on_player_placing
Event to call when the block is placed by a player.


 * {| class="wikitable"

!Type !!Name !!Default Value !!Description
 * String
 * event
 * Any event name you defined in "events".
 * }
 * Any event name you defined in "events".
 * }

minecraft:on_fall_on
Event to call when an entity falls on the block.


 * {| class="wikitable"

!Type!!Name!!Default Value!!Description
 * MoLang
 * condition
 * (Optional) The condition that should be met in order for the event to run. Can be any valid query.
 * String
 * target
 * self
 * (Optional) The target of the event executed by the block.
 * target
 * self
 * (Optional) The target of the event executed by the block.


 * {| class="wikitable"

!Options!! Description
 * self
 * The entity or object calling the test
 * other
 * The other member of an interaction, not the caller.
 * player
 * The player involved with the interaction.
 * }
 * Decimal
 * min_fall_distance
 * 0.0
 * The minimum distance in blocks that an actor needs to be within in order for the event to be triggered.
 * String
 * event
 * The event to call
 * }
 * String
 * event
 * The event to call
 * }
 * The event to call
 * }

minecraft:on_interact
Event to call when a player interacts with the block.


 * {| class="wikitable"

! Type!!Name!!Default Value!!Description
 * MoLang
 * condition
 * (Optional) The condition that should be met in order for the event to run. Can be any valid query.
 * String
 * target
 * self
 * (Optional) The target of the event executed by the block.
 * target
 * self
 * (Optional) The target of the event executed by the block.


 * {| class="wikitable"

!Options!! Description
 * self
 * The entity or object calling the test
 * other
 * The other member of an interaction, not the caller.
 * player
 * The player involved with the interaction.
 * }
 * String
 * event
 * The event to call
 * }
 * String
 * event
 * The event to call
 * }
 * }

minecraft:on_step_on
Event to call when an entity steps on the block.


 * {| class="wikitable"

!Type!!Name!!Default Value!!Description
 * MoLang
 * condition
 * (Optional) The condition that should be met in order for the event to run. Can be any valid query.
 * String
 * target
 * self
 * (Optional) The target of the event executed by the block.
 * target
 * self
 * (Optional) The target of the event executed by the block.


 * {| class="wikitable"

!Options!! Description
 * self
 * The entity or object calling the test
 * other
 * The other member of an interaction, not the caller.
 * player
 * The player involved with the interaction.
 * }
 * String
 * event
 * The event to call
 * }
 * String
 * event
 * The event to call
 * }
 * }

minecraft:on_step_off
Event to call when an entity steps off the block.


 * {| class="wikitable"

!Type !!Name!!Default Value!! Description
 * MoLang
 * condition
 * (Optional) The condition that should be met in order for the event to run. Can be any valid query.
 * String
 * target
 * self
 * (Optional) The target of the event executed by the block.
 * target
 * self
 * (Optional) The target of the event executed by the block.


 * {| class="wikitable"

!Options!! Description
 * self
 * The entity or object calling the test
 * other
 * The other member of an interaction, not the caller.
 * player
 * The player involved with the interaction.
 * }
 * String
 * event
 * The event to call
 * }
 * String
 * event
 * The event to call
 * }
 * }

Event Responses
These are located inside of events. They are what cause things to happen.

damage
Damages the specified target.


 * {| class="wikitable"

!Type!!Name!!Default Value !!Description
 * String
 * target
 * self
 * (Optional) The target of the event executed by the block.
 * (Optional) The target of the event executed by the block.


 * {| class="wikitable"

! Options!!Description
 * self
 * The entity or object calling the test
 * other
 * The other member of an interaction, not the caller.
 * player
 * The player involved with the interaction.
 * }
 * Integer
 * amount
 * 0
 * Amount of damage to deal
 * String
 * type
 * The damage type to deal. Will have an effect on the death message.
 * Amount of damage to deal
 * String
 * type
 * The damage type to deal. Will have an effect on the death message.
 * The damage type to deal. Will have an effect on the death message.
 * The damage type to deal. Will have an effect on the death message.


 * {| class="wikitable"

!Options!!Description
 * contact
 * none
 * lava
 * attack
 * override
 * projectile
 * suffocation
 * fall
 * starve
 * fire
 * fatal
 * Any damage which kills the subject
 * fire_tick
 * drowning
 * block_explosion
 * entity_explosion
 * void
 * suicide
 * magic
 * wither
 * anvil
 * thorns
 * falling_block
 * piston
 * fly_into_wall
 * }
 * }
 * fire
 * fatal
 * Any damage which kills the subject
 * fire_tick
 * drowning
 * block_explosion
 * entity_explosion
 * void
 * suicide
 * magic
 * wither
 * anvil
 * thorns
 * falling_block
 * piston
 * fly_into_wall
 * }
 * }
 * void
 * suicide
 * magic
 * wither
 * anvil
 * thorns
 * falling_block
 * piston
 * fly_into_wall
 * }
 * }
 * anvil
 * thorns
 * falling_block
 * piston
 * fly_into_wall
 * }
 * }
 * falling_block
 * piston
 * fly_into_wall
 * }
 * }
 * fly_into_wall
 * }
 * }
 * }
 * }
 * }

die
Kills the specified target. If the target is self then the block destroys itself.


 * {| class="wikitable"

!Type!!Name!! Default Value !!Description
 * String
 * target
 * self
 * (Optional) The target of the event executed by the block.
 * (Optional) The target of the event executed by the block.


 * {| class="wikitable"

!Options!!Description
 * self
 * The entity or object calling the test
 * other
 * The other member of an interaction, not the caller.
 * player
 * The player involved with the interaction.
 * }
 * }
 * The player involved with the interaction.
 * }
 * }

add_mob_effect
Applies a mob effect to the specified target.


 * {| class="wikitable"

!Type!!Name!!Default Value!!Description
 * Integer
 * amplifier
 * 0
 * The amplifier of the mob effect
 * Decimal
 * duration
 * 0,0
 * How long the mob effect will last.
 * String
 * effect
 * The mob effect to apply to the specified target.
 * String
 * target
 * self
 * (Optional) The target of the mob effect.
 * String
 * target
 * self
 * (Optional) The target of the mob effect.
 * (Optional) The target of the mob effect.


 * {| class="wikitable"

!Options!!Description
 * other
 * The other member of an interaction, not the caller.
 * player
 * The player involved with the interaction.
 * }
 * String
 * event
 * The event to call
 * }
 * event
 * The event to call
 * }
 * }

remove_mob_effect
Removes a mob effect from the specified target.


 * {| class="wikitable"

!Type!!Name!!Default Value !!Description
 * String
 * effect
 * The mob effect to remove. Use "all" to remove all effects from the specified target.
 * String
 * target
 * self
 * (Optional) The target of the mob effect.
 * target
 * self
 * (Optional) The target of the mob effect.


 * {| class="wikitable"

!Options!!Description
 * other
 * The other member of an interaction, not the caller.
 * player
 * The player involved with the interaction.
 * }
 * String
 * event
 * The event to call
 * }
 * event
 * The event to call
 * }
 * }

run_command
Runs one or an array of slash commands.


 * {| class="wikitable"

!Type!!Name!!Default Value!!Description
 * String/Array
 * command
 * The command/list of commands the block should run. No need to add the "/" symbol at the beginning.
 * String
 * target
 * self
 * }
 * target
 * self
 * }
 * }

play_effect
Plays a particle effect at the location of the specified target.


 * {| class="wikitable"

!Type!! Name!!Default!!Description
 * String
 * effect
 * The particle effect identifier.
 * Integer
 * data
 * 0
 * (Optional) Particle data value
 * String
 * target
 * self
 * The target defining where the particle effect is played.
 * String
 * target
 * self
 * The target defining where the particle effect is played.


 * {| class="wikitable"

!Options!!Description
 * other
 * The other member of an interaction, not the caller.
 * player
 * The player involved with the interaction.
 * self
 * The entity or object calling the test
 * }
 * String
 * event
 * The event to call
 * }
 * String
 * event
 * The event to call
 * }
 * }

play_sound
Plays a sound effect at the position of the given target


 * {| class="wikitable"

!Type!!Name!!Default!!Description
 * String
 * sound
 * The sound effect identifier.
 * string
 * target
 * self
 * The target defining where the sound effect is played.
 * target
 * self
 * The target defining where the sound effect is played.


 * {| class="wikitable"

!Options!!Description
 * other
 * The other member of an interaction, not the caller.
 * player
 * The player involved with the interaction.
 * self
 * The entity or object calling the test
 * }
 * String
 * event
 * The event to call
 * }
 * String
 * event
 * The event to call
 * }
 * }

swing
Causes the player interacting with the block to play the swing animation. Currently there is no way to filter this component.


 * {| class="wikitable"

! Description
 * An event response which causes the player interacting with the block to play the swing animation.
 * }
 * }

decrement_stack
Decrements 1 item from the stack the player interacting with the block is holding. Currently there is no way to filter this component.


 * {| class="wikitable"

!Description
 * An event response which decrements 1 item from the stack the player interacting with the block is currently holding.
 * }
 * }

spawn_loot
Spawns all the items in a specified loot table.


 * {| class="wikitable"

!Type!!Name!!Default!!Description
 * String
 * table
 * File path of the loot table file relative to the behavior pack folder.
 * }
 * File path of the loot table file relative to the behavior pack folder.
 * }

transform_item
Transforms the item the player is holding into another item


 * {| class="wikitable"

!Type !!Name!!Default!!Description
 * String
 * transform
 * The name of the item it should transform into.
 * }
 * The name of the item it should transform into.
 * }

set_block
Sets a block at the current block's position, overriding it

set_block_at_pos
Sets a block at a specified position, relative to the current block.


 * {| class="wikitable"

!Type!!Name!!Default!! Description
 * String
 * block_type
 * The block to set.
 * Vector [ a, b, c ]
 * block_offset
 * The new block's position, relative to the current block's offset.
 * }
 * block_offset
 * The new block's position, relative to the current block's offset.
 * }
 * }

set_block_property
Sets the value of a specified block property.


 * {| class="wikitable"

!Type!!Name!!Default Value !!Description Integer
 * MoLang
 * MoLang

String

Boolean
 * property name (eg. "example:myproperty)
 * The value the specified property should be set to.
 * }
 * }


 * Example

"set_block_property": { "examply:myproperty": "query.cardinal_facing" }

Useful Queries
Throughout your block behavior you will need to use some MoLang queries in order to create more advanced mechanics. Here are some block specific queries & their functions.


 * {| class="wikitable"

!Name!!Description!!Arguments!!Output
 * query.block_face
 * Returns which direction the block is facing (only valid with the minecraft:on_player_placing trigger)
 * down=0.0, up=1.0, north=2.0, south=3.0, west=4.0, east=5.0, undefined=6.0
 * query.cardinal_facing
 * Returns the current direction that the player is facing. Useful for creating a block which faces the player when being placed.
 * down=0.0, up=1.0, north=2.0, south=3.0, west=4.0, east=5.0, undefined=6.0
 * query.cardinal_facing_2d
 * Returns the current direction that the player is facing, ignoring up/down. Useful for creating a block which faces the player when being placed.
 * north=2.0, south=3.0, west=4.0, East=5.0, undefined=6.0
 * query.has_block_property
 * Tests whether or not the block has the associated property.
 * Takes a block property name as an argument.
 * true=1.0, false=0.0
 * query.block_property
 * Returns the value of the associated block property. Useful for changing permutations.
 * Takes a block property name as an argument.
 * The value of the property
 * }
 * Takes a block property name as an argument.
 * true=1.0, false=0.0
 * query.block_property
 * Returns the value of the associated block property. Useful for changing permutations.
 * Takes a block property name as an argument.
 * The value of the property
 * }
 * }


 * Examples

"query.has_block_property('example:my_property')" "query.block_property('example:my_color_property') == blue"