SizedIngredient

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.neoforge.api.item.SizedIngredient;

Members

implicit as IIngredientWithAmount
script.zs
// SizedIngredient as IIngredientWithAmount
mySizedIngredient as IIngredientWithAmount

Return Type: IIngredientWithAmount

Getter
script.zs
// SizedIngredient.count as int
mySizedIngredient.count

Return Type: int

Getter
script.zs
// SizedIngredient.ingredient as IIngredient
mySizedIngredient.ingredient

Return Type: IIngredient

Getter
script.zs
// SizedIngredient.items as IItemStack[]
mySizedIngredient.items

Return Type: IItemStack[]

static of(tag as KnownTag<Item>, count as int) as SizedIngredient
script.zs
// SizedIngredient.of(tag as KnownTag<Item>, count as int) as SizedIngredient;
SizedIngredient.of(myKnownTag, myInt);

Parameters:

count Type: int

Return Type: SizedIngredient

static of(item as ItemLike, count as int) as SizedIngredient
script.zs
// SizedIngredient.of(item as ItemLike, count as int) as SizedIngredient;
SizedIngredient.of(myItemLike, myInt);

Parameters:

item Type: ItemLike
count Type: int

Return Type: SizedIngredient

static of(ingredient as IIngredient, count as int) as SizedIngredient
script.zs
// SizedIngredient.of(ingredient as IIngredient, count as int) as SizedIngredient;
SizedIngredient.of(myIIngredient, myInt);

Parameters:

ingredient Type: IIngredient
count Type: int

Return Type: SizedIngredient

test(stack as IItemStack) as bool
script.zs
// SizedIngredient.test(stack as IItemStack) as bool;
mySizedIngredient.test(myIItemStack);

Parameters:

stack Type: IItemStack

Return Type: bool