Class DecomposedRecipeBuilder
java.lang.Object
com.blamejared.crafttweaker.api.recipe.component.DecomposedRecipeBuilder
Creates a simple instance of an
IDecomposedRecipe with the given components.
An instance of this class can be obtained through IDecomposedRecipe.builder(). It is highly suggested to
use this builder rather than implement the interface yourself.
- Since:
- 10.0.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds anIDecomposedRecipewith the given set of components.with(IRecipeComponent<C> component, C object) Adds the givenIRecipeComponentto the recipe, pointing to the given object.with(IRecipeComponent<C> component, List<C> object) Adds the givenIRecipeComponentto the recipe, pointing to the givenList.
-
Method Details
-
with
Adds the givenIRecipeComponentto the recipe, pointing to the given object.The contract of this method is the same as
IDecomposedRecipe.set(IRecipeComponent, List), except it operates on a recipe builder.- Type Parameters:
C- The type of objects pointed to by the component.- Parameters:
component- The component that needs to be added to the recipe.object- The data pointed to by the component.- Returns:
- This builder for chaining.
- Since:
- 10.0.0
-
with
Adds the givenIRecipeComponentto the recipe, pointing to the givenList.The contract of this method is the same as
IDecomposedRecipe.set(IRecipeComponent, List), except it operates on a recipe builder.- Type Parameters:
C- The type of objects pointed to by the component.- Parameters:
component- The component that needs to be added to the recipe.object- TheListcontaining the data pointed to by the component.- Returns:
- This builder for chaining.
- Since:
- 10.0.0
-
build
Builds anIDecomposedRecipewith the given set of components.- Returns:
- A new
IDecomposedRecipewith the specified set of components. - Since:
- 10.0.0
-