Skip to content

mcutils:flower_bed

Vanilla flower bed block behavior.

Registering

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

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

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

Component

Options

NameTypeDefaultDescription
flowers_statestringmcutils:flowers
max_flowersnumber4

Examples

Flower Bed

json
{
  "format_version": "1.21.100",
  "minecraft:block": {
    "description": {
      "identifier": "wiki:custom_flower_bed",
      "states": {
        "mcutils:flowers": [1, 2, 3, 4]
      }
    },
    "components": {
      "mcutils:flower_bed": {
        "flowers_state": "mcutils:flowers",
        "max_flowers": 4
      }
    }
  }
}

Not associated with or approved by Mojang Studios or Microsoft