minecraft:collision_box for you with a switch.Get GodCraftOverview
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
| Field | Type | Default | Description |
|---|---|---|---|
origin | vec3 | [-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. |
size | vec3 | [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
]
}
}