HomeCommandsExamplesGetting Started With ScriptsGlobal Keywords1.21 Migration Guide
IIngredientIIngredientWithAmountIngredient
BracketDumpersBracketHandlersBracketValidatorsResourceLocationBracketHandler

Ingredient

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

Description

This is the vanilla ingredient type. It is recommended that you use the IIngredient type whenever possible.
This type can automatically be cast from and to IIngredient, though.

Implements

Undocumented Interfaces

Predicate<ItemStack>

Members

asIIngredient() as IIngredient
Casts an Ingredient to an IIngredient.

Returns: The IIngredient.

script.zs
// Ingredient.asIIngredient() as IIngredient;
myIngredient.asIIngredient();

Return Type: IIngredient

implicit as IIngredient
Casts an Ingredient to an IIngredient.
script.zs
// Ingredient as IIngredient
myIngredient as IIngredient

Return Type: IIngredient