ChargedProjectiles

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.component.ChargedProjectiles;

Operators

in(item as Item) as bool
Checks if the ChargedProjectiles contains the given item.
script.zs
// ((item as ItemDefinition) in ChargedProjectiles) as bool
myItem in myChargedProjectiles

Parameters:

item Type: ItemDefinition - The item to check for.

Return Type: bool

Members

contains(item as Item) as bool
Checks if the ChargedProjectiles contains the given item.

Returns: Whether the ChargedProjectiles contains the given item.

script.zs
// ChargedProjectiles.contains(item as ItemDefinition) as bool;
myChargedProjectiles.contains(myItem);

Parameters:

item Type: ItemDefinition - The item to check for.

Return Type: bool

Getter
Checks if the ChargedProjectiles is empty.
script.zs
// ChargedProjectiles.empty as bool
myChargedProjectiles.empty

Return Type: bool

Getter
Gets the items of the ChargedProjectiles.
script.zs
// ChargedProjectiles.items as List<IItemStack>
myChargedProjectiles.items

Return Type: List<IItemStack>

static of(stack as IItemStack) as ChargedProjectiles
Creates a new ChargedProjectiles with the given item.

Returns: The new ChargedProjectiles.

script.zs
// ChargedProjectiles.of(stack as IItemStack) as ChargedProjectiles;
ChargedProjectiles.of(myIItemStack);

Parameters:

stack Type: IItemStack - The item to create the ChargedProjectiles from.

Return Type: ChargedProjectiles

static of(stacks as List<IItemStack>) as ChargedProjectiles
Creates a new ChargedProjectiles with the given items.

Returns: The new ChargedProjectiles.

script.zs
// ChargedProjectiles.of(stacks as List<IItemStack>) as ChargedProjectiles;
ChargedProjectiles.of(myList);

Parameters:

stacks Type: List<IItemStack> - The items to create the ChargedProjectiles from.

Return Type: ChargedProjectiles