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

ProjectileWeaponItem

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.ProjectileWeaponItem;

Extends

ProjectileWeaponItem extends ItemDefinition.

Implements

ProjectileWeaponItem implements the following interfaces:

ItemLike

Undocumented Interfaces

FeatureElement,IItemExtension

Members

Getter
Gets a predicate for the supported projectiles for this item.
script.zs
// ProjectileWeaponItem.allSupportedProjectiles as function(t as ItemStack) as bool
myProjectileWeaponItem.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
// ProjectileWeaponItem.ARROW_ONLY() as function(t as ItemStack) as bool;
ProjectileWeaponItem.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
// ProjectileWeaponItem.ARROW_OR_FIREWORK() as function(t as ItemStack) as bool;
ProjectileWeaponItem.ARROW_OR_FIREWORK();

Return Type: function(t as ItemStack) as bool

asItem() as Item
script.zs
// ProjectileWeaponItem.asItem() as Item;
myProjectileWeaponItem.asItem();

Return Type: ItemDefinition

as Item
script.zs
// ProjectileWeaponItem as Item
myProjectileWeaponItem as Item

Return Type: ItemDefinition

Getter
script.zs
// ProjectileWeaponItem.commandString as string
myProjectileWeaponItem.commandString

Return Type: string

commandString() as string
script.zs
// ProjectileWeaponItem.commandString() as string;
myProjectileWeaponItem.commandString();

Return Type: string

Getter
script.zs
// ProjectileWeaponItem.defaultInstance as IItemStack
myProjectileWeaponItem.defaultInstance

Return Type: IItemStack

defaultInstance() as IItemStack
script.zs
// ProjectileWeaponItem.defaultInstance() as IItemStack;
myProjectileWeaponItem.defaultInstance();

Return Type: IItemStack

implicit as IItemStack
script.zs
// ProjectileWeaponItem as IItemStack
myProjectileWeaponItem as IItemStack

Return Type: IItemStack

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

Return Type: int

Getter
script.zs
// ProjectileWeaponItem.registryName as ResourceLocation
myProjectileWeaponItem.registryName

Return Type: ResourceLocation

registryName() as ResourceLocation
script.zs
// ProjectileWeaponItem.registryName() as ResourceLocation;
myProjectileWeaponItem.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
// ProjectileWeaponItem.supportedHeldProjectiles as function(t as ItemStack) as bool
myProjectileWeaponItem.supportedHeldProjectiles

Return Type: function(t as ItemStack) as bool