mcutils:strippable
Vanilla strippable block behavior.
Registering
Before you can use this component you need to register it.
js
import { system } from "@minecraft/server";
import { StrippableComponent } from "@lpsmods/mc-utils";
system.beforeEvents.startup.subscribe((event) => {
event.blockComponentRegistry.registerCustomComponent(StrippableComponent.typeId, new StrippableComponent());
});
Component
Options
Name | Type | Default | Description |
---|---|---|---|
block | string | ||
sound_event | string | dig.wood |
Examples
Log
json
{
"format_version": "1.21.100",
"minecraft:block": {
"description": {
"identifier": "wiki:custom_log",
"traits": {
"minecraft:placement_position": {
"enabled_states": ["minecraft:block_face"]
}
}
},
"components": {
"mcutils:strippable": {
"block": "wiki:stripped_log",
"sound_event": "dig.wood"
}
}
}
}