Skip to content

mcutils:sittable

Sittable block behavior.

Registering

Before you can use this component you need to register it.

js
import { system } from "@minecraft/server";
import { SittableComponent } from "@lpsmods/mc-utils";

system.beforeEvents.startup.subscribe((event) => {
  event.blockComponentRegistry.registerCustomComponent(SittableComponent.typeId, new SittableComponent());
});

Component

Options

NameTypeDefaultDescription
seat_positionnumber[][0,8,0]
seat_animationsstring[][]

Examples

Seat

json
{
  "format_version": "1.21.100",
  "minecraft:block": {
    "description": {
      "identifier": "wiki:seat",
      "traits": {
        "minecraft:placement_direction": {
          "enabled_states": ["minecraft:cardinal_direction"],
          "y_rotation_offset": 180.0
        }
      }
    },
    "components": {
      "mcutils:sittable": {
        "seat_position": [0, 8, 0],
        "seat_animations": ["animation.player.sit"]
      }
    }
  }
}

Not associated with or approved by Mojang Studios or Microsoft