@bedrock-oss/bedrock-boost
    Preparing search index...

    Class ItemUtils

    Index

    Constructors

    Methods

    • Consumes durability from the player's selected item.

      Parameters

      Returns boolean

      True if the durability was consumed, false otherwise.

      Return value false does not always mean that the function failed. It can also mean that the item was not damaged due to unbreaking enchantment.

    • Returns the chance to consume durability from item based on the unbreaking level.

      Parameters

      • unbreakingLevel: number

        The unbreaking level of the item.

      Returns number

      The chance to consume durability from item based on the unbreaking level.