Импорт класса

Link to импорт-класса

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.item.ItemCooldowns;

Name: addCooldown

ZenScript
Copy
ItemCooldowns.addCooldown(item as ItemDefinition, ticks as int)
ПараметрТип
Параметр
item
Тип
ItemDefinition
Параметр
ticks
Тип
int

Link to getCooldownPercent

Name: getCooldownPercent

Return Type: float

ZenScript
Copy
ItemCooldowns.getCooldownPercent(item as ItemDefinition, partialTicks as float) as float
ПараметрТип
Параметр
item
Тип
ItemDefinition
Параметр
partialTicks
Тип
float

Name: isOnCooldown

Return Type: boolean

ZenScript
Copy
ItemCooldowns.isOnCooldown(item as ItemDefinition) as boolean
ПараметрТип
Параметр
item
Тип
ItemDefinition

Name: removeCooldown

ZenScript
Copy
ItemCooldowns.removeCooldown(item as ItemDefinition)
ПараметрТип
Параметр
item
Тип
ItemDefinition