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
Name | Type | Default | Description |
---|---|---|---|
flowers_state | string | mcutils:flowers | |
max_flowers | number | 4 |
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
}
}
}
}