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

minecraft:collision_box

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

Overview

minecraft:collision_box is a block component: it goes in the components object of a custom block. Sets the solid part of the block that players, mobs and items bump into. Set it to false so everything walks right through, like tall grass, or give a smaller box for slabs and other small shapes.

Fields

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

Example

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

BP/blocks/<name>.json
{
  "minecraft:collision_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