Skip to content

mcutils:vertical_slab

Vertical slab block behavior.

Registering

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

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

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

Component

Options

NameTypeDefaultDescription
direction_statestringminecraft:cardinal_direction
double_statestringmcutils:double

Examples

Vertical Slab

json
{
  "format_version": "1.21.100",
  "minecraft:block": {
    "description": {
      "identifier": "wiki:custom_vertical_slab",
      "traits": {
        "minecraft:placement_direction": {
          "enabled_states": ["minecraft:cardinal_direction"]
        }
      },
      "states": { "mcutils:double": [false, true] }
    },
    "components": {
      "mcutils:vertical_slab": {
        "double_state": "mcutils:double",
        "direction_state": "minecraft:cardinal_direction"
      }
    }
  }
}

Not associated with or approved by Mojang Studios or Microsoft