Class ItemCooldownComponentBeta

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

Hierarchy

Constructors

Properties

cooldownCategory: string

Remarks

Represents the cooldown category that this item is associated with.

Throws

This property can throw when used.

cooldownTicks: number

Remarks

Amount of time, in ticks, that remain for this item cooldown.

Throws

This property can throw when used.

typeId: string

Remarks

Identifier of the component.

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

Remarks

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

Methods

  • Parameters

    Returns void

    Remarks

    Starts a new cooldown period for this item.

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

    Throws

    This function can throw errors.