> ## 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.

# Doors and states

> Doors that swing or slide, and props that switch between looks.

## Doors

```yaml theme={null}
wardrobe_door:
  type: prop
  model: wardrobe.json
  door:
    rotation: 90               # swings open: degrees, or pitch,yaw,roll...
    translation: -0.85,0,0     # ...and/or slides (blocks)
    open-model: open.json      # optional: a different model while open
    animation: 4t              # how long opening takes
    passable: true             # walk through it while open (default)
    auto-close: 3s
    open-sound: block.wooden_door.open
    close-sound: block.wooden_door.close
```

## States

Right-clicking moves to the next state. Each state can change the model and the light:

```yaml theme={null}
tv:
  type: prop
  model: tv_off.json
  states:
    on:
      model: tv_on.json
      light: 10
      sound: block.lever.click
      reset-after: 1m          # goes back to the first state after this long
    static:
      model: tv_static.json
      next-after: 5s           # moves on by itself
```


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