@occultus/api-root - v0.29.3
    Preparing search index...

    Function consumeDurability

    • 添加物品的损坏值,即消耗其耐久。当entity是创造模式或是undefined,会直接返回item

      Parameters

      • item: ItemStack

        要添加损坏值的物品

      • value: number

        要添加的损坏值

      • Optionalentity: Entity

        当物品损坏时,向手持物品的实体播放声音

      Returns ItemStack | undefined

      添加损坏值的 ItemStack

      RawDiamondMC, FangLimao