Package wtf.choco.alchema.crafting
Class CauldronRecipe.Builder
java.lang.Object
wtf.choco.alchema.crafting.CauldronRecipe.Builder
- Enclosing class:
- CauldronRecipe
public static final class CauldronRecipe.Builder
extends java.lang.Object
A builder for immutable
CauldronRecipe
instances.-
Method Summary
Modifier and Type Method Description CauldronRecipe.Builder
addIngredient(@NotNull CauldronIngredient ingredient)
Add an ingredient to the recipe.@NotNull CauldronRecipe
build()
Build a newCauldronRecipe
instance.CauldronRecipe.Builder
setComment(@Nullable java.lang.String comment)
Set the comment for this recipe.CauldronRecipe.Builder
setExperience(int experience)
Set the experience to be yielded from crafting this recipe.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
addIngredient
@NotNull public CauldronRecipe.Builder addIngredient(@NotNull @NotNull CauldronIngredient ingredient)Add an ingredient to the recipe.- Parameters:
ingredient
- the ingredient to add- Returns:
- this instance. Allows for chained method calls
-
setExperience
Set the experience to be yielded from crafting this recipe. The experience set is directly proportional toExperienceOrb.setExperience(int)
.- Parameters:
experience
- the experience to set. Must be positive or 0- Returns:
- this instance. Allows for chained method calls
-
setComment
Set the comment for this recipe. Comments are purely aesthetic.- Parameters:
comment
- the comment to set- Returns:
- this instance. Allows for chained method calls
-
build
Build a newCauldronRecipe
instance.- Returns:
- the cauldron recipe
-