1. Wiki
  2. /Blocks
  3. /minecraft:selection_box

minecraft:selection_box

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

Overview

minecraft:selection_box is a block component: it goes in the components object of a custom block. Sets the part of the block the player can point at and click, shown by the outline. Set it to false so the block cannot be targeted at all.

Fields

FieldTypeDefaultDescription
originvec3[-8,0,-8]Corner where the box starts, in pixels (16 per block), measured from the bottom center of the block.
sizevec3[16,16,16]Width, height and depth of the box in pixels. [16, 16, 16] is a full block.

Example

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

BP/blocks/<name>.json
{
  "minecraft:selection_box": {
    "origin": [
      -8,
      0,
      -8
    ],
    "size": [
      16,
      16,
      16
    ]
  }
}

Blocks: Behavior pack

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