minecraft:block_placer
Items with the block_placer component will place a block when used.
This component can also be used instead of the "minecraft:icon" component to render the referenced block as the item icon.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
block required | Text | — | Defines the block that will be placed. |
use_on | List of object or text0 to 256 entries | [] | List of block descriptors of the blocks that this item can be used on. If left empty, all blocks will be allowed. |
replace_block_item | Boolean | false | If true, the item will be registered as the item for this block. This item will be returned by default when the block is broken/picked. Note: the identifier for this item must match the block's identifier for this field to be valid. Defaults to false. |
aligned_placement | Boolean | false | If true, block placement through this item will be aligned while holding the interaction button down. Defaults to false. |
Example from the game files
This is how vanilla shelf_mushroom uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:block_placer": {
"block": "minecraft:shelf_mushroom",
"replace_block_item": true
}
}Used by 2
Vanilla items with minecraft:block_placer in their definition:
red_shrubshelf_mushroom