mcutils:pottable
Makes this item pottable.
Registering
Before you can use this component you need to register it.
js
import { system } from "@minecraft/server";
import { PottableComponent } from "@lpsmods/mc-utils";
system.beforeEvents.startup.subscribe((event) => {
event.blockComponentRegistry.registerCustomComponent(PottableComponent.typeId, new PottableComponent());
});
Component
Options
Name | Type | Default | Description |
---|---|---|---|
block | string | ||
flower_pot | string | flower_pot |
Examples
Flower
json
{
"format_version": "1.21.100",
"minecraft:item": {
"description": {
"identifier": "wiki:custom_flower"
},
"components": {
"mcutils:pottable": {
"block": "wiki:potted_flower",
"flower_pot": "minecraft:flower_pot"
}
}
}
}
Sapling
json
{
"format_version": "1.21.100",
"minecraft:item": {
"description": {
"identifier": "wiki:custom_sapling"
},
"components": {
"mcutils:pottable": {
"block": "wiki:potted_sapling",
"flower_pot": "minecraft:flower_pot"
}
}
}
}