RecipeHolder

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.recipe.type.RecipeHolderRecipeHolder;

Description

Holds Recipe recipe and a ResourceLocation id.

Members

Getter
Gets the id of this holder
script.zs
// RecipeHolder<T : Recipe>.id as ResourceLocation
myRecipeHolder.id

Return Type: ResourceLocation

implicit as ResourceLocation
Gets the id of this holder
script.zs
// RecipeHolder<T : Recipe> as ResourceLocation
myRecipeHolder as ResourceLocation

Return Type: ResourceLocation

Getter
Gets the recipe held by this holder.
script.zs
// RecipeHolder<T : Recipe>.value as Recipe<Container>
myRecipeHolder.value

Return Type: Recipe<Container>

implicit as Recipe<Container>
Gets the recipe held by this holder.
script.zs
// RecipeHolder<T : Recipe> as Recipe<Container>
myRecipeHolder as Recipe<Container>

Return Type: Recipe<Container>