Skip to content

mcutils:tool

Deals damage to the item when you break a block or hit an entity.

Component

Options

NameTypeDefaultDescription
damage_when_minedbooleanfalse
damage_when_hitbooleanfalse

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
      }
    }
  }
}

Not associated with or approved by Mojang Studios or Microsoft