Home Commands Examples Getting Started With Scripts Global Keywords 1.21 Migration Guide
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

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

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<RecipeInput>
myRecipeHolder.value

Return Type: Recipe<RecipeInput>

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

Return Type: Recipe<RecipeInput>