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

BowItem

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

Extends

BowItem extends ProjectileWeaponItem.

Implements

BowItem implements the following interfaces:

Vanishable,ItemLike

Undocumented Interfaces

FeatureElement,IItemExtension

Members

Getter
Gets a predicate for the supported projectiles for this item.
script.zs
// BowItem.allSupportedProjectiles as function(t as ItemStack) as bool
myBowItem.allSupportedProjectiles

Return Type: function(t as ItemStack) as bool

static ARROW_ONLY() as function(t as ItemStack) as bool
A predicate which only accepts arrow items
script.zs
// BowItem.ARROW_ONLY() as function(t as ItemStack) as bool;
BowItem.ARROW_ONLY();

Return Type: function(t as ItemStack) as bool

static ARROW_OR_FIREWORK() as function(t as ItemStack) as bool
A predicate which supports arrow items and fireworks
script.zs
// BowItem.ARROW_OR_FIREWORK() as function(t as ItemStack) as bool;
BowItem.ARROW_OR_FIREWORK();

Return Type: function(t as ItemStack) as bool

asItem() as Item
script.zs
// BowItem.asItem() as Item;
myBowItem.asItem();

Return Type: ItemDefinition

as Item
script.zs
// BowItem as Item
myBowItem as Item

Return Type: ItemDefinition

Getter
script.zs
// BowItem.commandString as string
myBowItem.commandString

Return Type: string

commandString() as string
script.zs
// BowItem.commandString() as string;
myBowItem.commandString();

Return Type: string

Getter
script.zs
// BowItem.defaultInstance as IItemStack
myBowItem.defaultInstance

Return Type: IItemStack

defaultInstance() as IItemStack
script.zs
// BowItem.defaultInstance() as IItemStack;
myBowItem.defaultInstance();

Return Type: IItemStack

implicit as IItemStack
script.zs
// BowItem as IItemStack
myBowItem as IItemStack

Return Type: IItemStack

Getter
Gets the default projectile range for this item.
script.zs
// BowItem.defaultProjectileRange as int
myBowItem.defaultProjectileRange

Return Type: int

static getPowerForTime(charge as int) as float
Converts the given time to a power value between 0 and 1

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

script.zs
// BowItem.getPowerForTime(charge as int) as float;
BowItem.getPowerForTime(5);

Parameters:

charge Type: int - The charge to convert

Return Type: float

Getter
script.zs
// BowItem.registryName as ResourceLocation
myBowItem.registryName

Return Type: ResourceLocation

registryName() as ResourceLocation
script.zs
// BowItem.registryName() as ResourceLocation;
myBowItem.registryName();

Return Type: ResourceLocation

Getter
Gets a predicate for the supported held projectiles for this item.


held projectiles are projectiles that can only be used when held in the off-hand while shooting / charging

script.zs
// BowItem.supportedHeldProjectiles as function(t as ItemStack) as bool
myBowItem.supportedHeldProjectiles

Return Type: function(t as ItemStack) as bool