Importing the class

Link to importing-the-class

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.type.projectileweapon.BowItem;

Extending ProjectileWeaponItem

Link to extending-projectileweaponitem

BowItem extends ProjectileWeaponItem. That means all methods available in ProjectileWeaponItem are also available in BowItem

Name: getPowerForTime

Converts the given time to a power value between 0 and 1

Returns: the given time as a power value between 0 and 1
Return Type: float

ZenScript
Copy
// BowItem.getPowerForTime(charge as int) as float

BowItem.getPowerForTime(5);
ParameterTypeDescription
Parameter
charge
Type
int
Description
The charge to convert