1. Wiki
  2. /Items
  3. /minecraft:block_placer

minecraft:block_placer

Don't want to write this by hand? GodCraft sets minecraft:block_placer for you with a switch.Get GodCraft

Overview

minecraft:block_placer is an item component: it goes in the components object of a custom item. Makes the item put a block in the world when the player uses it, like a seed or a sign item. It can also show that block as the item's icon, so you may not need a separate icon.

Fields

FieldTypeDefaultDescription
blockBlock ReferencenoneThe block that gets placed when the item is used.
use_onBlock Descriptor[]noneBlocks the item may be used on to place its block. Leave it empty to allow any block.
replace_block_itembooleanfalseWhen true, this item becomes the official item of the block, so breaking or pick-blocking the block gives this item. The item and block need the same identifier.
aligned_placementbooleanfalseWhen true, holding the use button places blocks in a neat straight line.

Example

Inside the components object of BP/items/<name>.json (values are the defaults or placeholders):

BP/items/<name>.json
{
  "minecraft:block_placer": {
    "block": {},
    "use_on": [],
    "replace_block_item": false,
    "aligned_placement": false
  }
}

Items: Behavior pack

We use cookies to improve your experience and analyse site traffic. Learn more