mcutils:tool
Deals damage to the item when you break a block or hit an entity.
Component
Options
Name | Type | Default | Description |
---|---|---|---|
damage_when_mined | boolean | false | |
damage_when_hit | boolean | false |
Examples
Pickaxe
json
{
"format_version": "1.21.100",
"minecraft:item": {
"description": {
"identifier": "wiki:custom_pickaxe"
},
"components": {
"mcutils:tool": {
"damage_when_mined": true
}
}
}
}
Sword
json
{
"format_version": "1.21.100",
"minecraft:item": {
"description": {
"identifier": "wiki:custom_sword"
},
"components": {
"mcutils:tool": {
"damage_when_hit": true
}
}
}
}