resourcepack.ai
DOCS

Models

Seats, light and surfaces

A placed model (furniture or decoration put down from an item) can be sat on, give off light, be limited to floors, walls or ceilings, and drop something other than itself. Each is one key in the item's place: block.

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 the height of the seat's surface above the model's base, in blocks. A dining chair is about 0.5, a bar stool nearer 1.1, a log on the ground 0.25.

A seat is not always in the middle of a piece (a bench, 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

These are relative to the piece, not world x and z. They turn with it, so a bench placed facing east seats people along itself rather than across it. Each offset can be up to 16 blocks.

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

If every chair on your server sits people a little high or low, nudge them all at once with models.seat-offset in config.yml (positive is higher), then /rp reload. No restart needed.

Nothing is left behind in the world when somebody gets up, leaves, or the server stops.

Sometimes a click does something else first. A model with a right-click animation, states or storage does that on a plain click, and you sit by sneaking and right-clicking. See which click does what.

Light#

A display entity gives off no light, so light: puts a real light block in the model's block space and removes it when the piece is broken. A lamp wants about 14.

A solid piece cannot also be a lamp

The barrier and the light would have to be the same block, and the barrier wins. Put a non-solid lamp beside a solid model instead.

Where it may go#

surface: refuses a placement on the wrong face 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

What it drops#

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

drop: gives a different content ID instead, for a piece meant to break rather than come back: a statue that drops rubble, a window that drops shards. A shulker container ignores drop:, because it always gives back itself with its contents inside.