@minecraft/server
    Preparing search index...

    Class ItemCooldownComponentBeta

    When present on an item, this item has a cooldown effect when used by entities.

    Hierarchy (View Summary)

    Index

    Properties

    cooldownCategory: string

    Represents the cooldown category that this item is associated with.

    This property can throw when used.

    cooldownTicks: number

    Amount of time, in ticks, it will take this item to cooldown.

    This property can throw when used.

    isValid: boolean

    Returns whether the component is valid. A component is considered valid if its owner is valid, in addition to any addition to any additional validation required by the component.

    typeId: string

    Identifier of the component.

    componentId: "minecraft:cooldown" = 'minecraft:cooldown'

    Methods

    • Beta

      Parameters

      Returns number

      This function can't be called in read-only mode.

      This function can throw errors.

    • Beta

      Parameters

      • cooldownCategory: string

        The cooldown category that might be associated with this item.

      Returns boolean

      True if the item is the given cooldown category.

      Will return true if the item is the cooldown category passed in and false otherwise.

      This function can't be called in read-only mode.

      This function can throw errors.

    • Beta

      Parameters

      Returns void

      Starts a new cooldown period for this item.

      This function can't be called in read-only mode.

      This function can throw errors.