mcutils:slab
Vanilla slab block behavior.
Registering
Before you can use this component you need to register it.
js
import { system } from "@minecraft/server";
import { SlabComponent } from "@lpsmods/mc-utils";
system.beforeEvents.startup.subscribe((event) => {
event.blockComponentRegistry.registerCustomComponent(SlabComponent.typeId, new SlabComponent());
});
Component
Options
Name | Type | Default | Description |
---|---|---|---|
double_state | string | mcutils:double |
Examples
Slab
json
{
"format_version": "1.21.100",
"minecraft:block": {
"description": {
"identifier": "wiki:custom_slab",
"traits": {
"minecraft:placement_position": {
"enabled_states": ["minecraft:vertical_half"]
}
},
"states": {
"mcutils:double": [false, true]
}
},
"components": {
"mcutils:slab": {
"double_state": "mcutils:double"
}
}
}
}