mcutils:axe
Makes this item strip logs like an axe.
Registering
Before you can use this component you need to register it.
js
import { system } from "@minecraft/server";
import { AxeComponent } from "@lpsmods/mc-utils";
system.beforeEvents.startup.subscribe((event) => {
event.blockComponentRegistry.registerCustomComponent(AxeComponent.typeId, new AxeComponent());
});
Component
Options
Name | Type | Default | Description |
---|---|---|---|
size | number | 1 | |
sound_event | string | use.gravel | |
interactions | Interaction[] | [] |
Interaction
Name | Type | Description |
---|---|---|
block | string | |
converted_block | string |
Examples
Axe
json
{
"format_version": "1.21.100",
"minecraft:item": {
"description": {
"identifier": "wiki:custom_axe"
},
"components": {
"mcutils:axe": {
"size": 1,
"sound_event": "use.gravel",
"interactions": [{ "block": "log", "converted_block": "stripped_log" }]
}
}
}
}