> ## Documentation Index
> Fetch the complete documentation index at: https://items.lodemc.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Prop hitboxes

> What players bump into and click on. Worked out from the model by default, or written by hand.

The hitbox decides what players stand on, bump into and click. Usually you don't need to write one: LodeItems works it out from the model.

## Modes

**hitbox** `text or list` (default: auto)

* `auto`: follows the model's shape (see below).
* `cubes`: a full solid block wherever the model is.
* `precise`: the model rebuilt from small solid boxes. Exact, but each box costs entities for every player who can see it, so use it sparingly.
* `none`: no hitbox. The piece can't be clicked or broken by hand.
* A list of parts, described below.

### How `auto` works

Each block-sized cell of the model gets the shape that fits it best:

* a **full block** for solid parts,
* a vanilla **shape** (slab, stairs, panel, rod, lantern box or pane) where that fits better,
* or only a **click box** for thin parts like a rug, which you can click but walk over.

A chair gets stairs plus a panel for its back, a lamp gets a lantern box, and a table gets a full block. All of these are blocks, so they cost nothing extra and players never get kicked for "flying" while standing on a prop.

A model has to reach 3 pixels into a cell to claim it, so a lampshade poking 2 pixels into the block above doesn't make that block solid.

## Writing your own

Positions are `x,y,z` in blocks from the piece's own block, **as seen from its front**: `-z` is towards the front, and `left` and `right` are as you face the piece. They turn with the piece.

```yaml theme={null}
big_table:
  type: prop
  model: big_table.json
  hitbox:
    - 0..1,0,0..1                 # a 2x1x2 block of solid cells
    - slab 0,1,0 top              # half a cell
    - stairs 2,0,0                # high side at the back
    - interaction 0,1,0 1x0.5     # click-only box: offset, width x height
    - shulker 0,0.25,0 0.5        # solid box of any size: offset, size
```

| Part | Written as | Is |
| - | - | - |
| Cell | `x,y,z` or `x1..x2,y,z1..z2` | Full solid blocks. Ranges fill a box. |
| Slab | `slab x,y,z [top]` | Half a block, bottom by default. |
| Stairs | `stairs x,y,z [top] [inner-left \| inner-right \| outer-left \| outer-right]` | Stairs with the high side at the back. |
| Panel | `panel x,y,z <front \| back \| left \| right \| top \| bottom>` | A 3-pixel plate on one side. |
| Rod | `rod x,y,z [y \| x \| z]` | A thin bar through the middle. |
| Lantern | `lantern x,y,z [hanging]` | A small box, like a lantern. |
| Pane | `pane x,y,z [left] [right]` or `pane x,y,z post` | A thin wall through the middle, reaching those sides. |
| Interaction | `interaction x,y,z WxH` | Clickable, but you walk through it. Any size. |
| Shulker | `shulker x,y,z size` | Solid box of any size and position. Costs entities. |

A hitbox can have at most 512 cells.

## Which to pick

| You want | Use |
| - | - |
| Most props | Leave it as `auto`. |
| Something big and blocky | `cubes`, or cell ranges. |
| A thin decoration you can walk through | `interaction` boxes only. |
| A solid shape between block sizes | `shulker` boxes, a few at most. |
| An exact copy of an odd shape | `precise`, for a few showpieces. |

Beds always use full cells for the parts you sleep in.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.