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

IIngredientWithAmount

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.ingredient.IIngredientWithAmount;

Description

Consists of an ingredient and an amount.

Implements

IIngredientWithAmount implements the following interfaces:

CommandStringDisplayable

Members

Getter
Gets the amount of Items in the ItemStack
script.zs
// IIngredientWithAmount.amount as int
myIIngredientWithAmount.amount

Return Type: int

asIData() as IData
script.zs
// IIngredientWithAmount.asIData() as IData;
myIIngredientWithAmount.asIData();

Return Type: IData

implicit as IData
script.zs
// IIngredientWithAmount as IData
myIIngredientWithAmount as IData

Return Type: IData

Getter
Returns the BEP to get this thingy
script.zs
// IIngredientWithAmount.commandString as string
myIIngredientWithAmount.commandString

Return Type: string

commandString() as string
Returns the BEP to get this thingy
script.zs
// IIngredientWithAmount.commandString() as string;
myIIngredientWithAmount.commandString();

Return Type: string

Getter
The backing ingredient
script.zs
// IIngredientWithAmount.ingredient as IIngredient
myIIngredientWithAmount.ingredient

Return Type: IIngredient