Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

ItemCooldowns

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.item.ItemCooldowns;

Operators

in(item as Item) as bool
script.zs
// ((item as Item) in ItemCooldowns) as bool
myItem in myItemCooldowns

Parameters:

Return Type: bool

Members

addCooldown(item as Item, ticks as int)
script.zs
// ItemCooldowns.addCooldown(item as Item, ticks as int);
myItemCooldowns.addCooldown(myItem, myInt);

Parameters:

ticks Type: int
getCooldownPercent(item as Item, partialTicks as float) as float
script.zs
// ItemCooldowns.getCooldownPercent(item as Item, partialTicks as float) as float;
myItemCooldowns.getCooldownPercent(myItem, myFloat);

Parameters:

partialTicks Type: float

Return Type: float

isOnCooldown(item as Item) as bool
script.zs
// ItemCooldowns.isOnCooldown(item as Item) as bool;
myItemCooldowns.isOnCooldown(myItem);

Parameters:

Return Type: bool

removeCooldown(item as Item)
script.zs
// ItemCooldowns.removeCooldown(item as Item);
myItemCooldowns.removeCooldown(myItem);

Parameters: