Script API - v1.19.70
    Preparing search index...

    When present on an item, this item can take damage in the process of being used. Note that this component only applies to data-driven items.

    Index

    Constructors

    Properties

    damage: number

    Returns the current damage level of this particular item.

    maxDurability: number

    Represents the amount of damage that this item can take before breaking.

    This property can throw when used.

    componentId: "minecraft:durability" = 'minecraft:durability'

    Identifier of this component. Should always be 'minecraft:durability'.

    Methods

    • Beta

      Parameters

      • Optionalunbreaking: number

        Unbreaking factor to consider in factoring the damage chance. Incoming unbreaking parameter must be greater than 0.

      Returns number

      Returns the maximum chance that this item would be damaged using the damageRange property, given an unbreaking level.

      This function can throw errors.