IIngredientWithAmount

Link to iingredientwithamount

Consists of an ingredient and an amount.

Importare la Classe

Link to importare-la-classe

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.ingredient.IIngredientWithAmount;

Interfacce Implementate

Link to interfacce-implementate

IIngredientWithAmount implements the following interfaces. That means all methods defined in these interfaces are also available in IIngredientWithAmount

Result TypeImplicito
Result Type
IData
Implicito

Name: asIData

Return Type: IData

ZenScript
Copy
// IIngredientWithAmount.asIData() as IData

myIIngredientWithAmount.asIData();

Link to getCommandString

Name: getCommandString

Returns the BEP to get this thingy

Return Type: string

ZenScript
Copy
// IIngredientWithAmount.getCommandString() as string

myIIngredientWithAmount.getCommandString();
NomeTipoHa GetterHa SetterDescrizione
Nome
amount
Tipo
int
Ha Getter
Ha Setter
no
Descrizione
Gets the amount of Items in the ItemStack
Nome
commandString
Tipo
string
Ha Getter
Ha Setter
no
Descrizione
Returns the BEP to get this thingy
Nome
ingredient
Tipo
IIngredient
Ha Getter
Ha Setter
no
Descrizione
The backing ingredient