resourcepack.ai
DOCS

Models

Seats, light and surfaces

Four more things a place: block can say.

chair:
  material: PAPER
  model: chair
  place:
    seat: 0.5            # sit on it, this far above its base. 0 is no seat
    light: 0             # 0-15, what it gives off
    surface: floor       # floor | wall | ceiling | any
    drop: mypack:shard   # what breaking it gives back. Default: itself

Sitting#

seat: is how far above the model's base a player's backside goes, in blocks. A dining chair is about 0.5, a bar stool nearer 1.1, a log on the ground 0.25 — it is per model, because furniture is any height.

A seat is not always in the middle of a piece — a bench, a car, an L-shaped sofa — so it can be three numbers instead of one:

place:
  seat:
    x: 0.4      # to the piece's RIGHT. Negative is left
    y: 0.5      # up, the same number the short form gives
    z: -0.15    # in FRONT of it. Negative is behind

Side and forward, not world x and z. They turn with the piece, so a bench placed facing east seats people along itself rather than across it.

If every chair on your server sits people a little high or low, that is not your number: it is how the game draws a seated player. Nudge them all at once with models.seat-offset in config.yml and /rp reload — sit, adjust, reload, sit again, with no restart.

Right-click to sit, shift to get up. One player per model, and a model with a seat keeps its hitbox.

The seat is never saved

It is a marker the player rides, and it is gone on dismount, on quit, when the model is broken, and when the server stops.

That is deliberate. The way this feature usually rots is a world slowly filling with invisible things players can stand on, months after the chairs they belonged to were removed — so nothing is left behind to accumulate.

A model that animates plays its animation on right-click instead. Shift-right- click still sits.

Light#

A display entity emits nothing, so light: puts a real light block in the model's anchor and takes it away when the piece is broken. A lamp wants about 14.

A solid piece cannot also be a lamp

One block cannot be a barrier and a light at once, and the barrier wins. If you need both, the usual answer is a solid model beside a non-solid lamp rather than one piece trying to be two things.

Where it may go#

surface: refuses a placement rather than turning the piece sideways.

surface:Where it can go
floorThe top of a block. Chairs, tables, statues. The default
wallThe side of one. Torches, signs, brackets
ceilingThe underside. Chandeliers, hanging plants
anyAnywhere

A chandelier stuck to the underside of a floor is somebody's build ruined, so the wrong face is a refusal and not a rotation.

What it drops#

Breaking a piece gives back the item it was placed from, keeping whatever name or enchantments that item had — so a renamed chair comes back renamed.

drop: overrides that with a different content ID, for a piece that is meant to break rather than come back. A statue that drops rubble, a window that drops shards.