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
Name | Type | Default | Description |
---|---|---|---|
seat_position | number[] | [0,8,0] | |
seat_animations | string[] | [] |
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"]
}
}
}
}