Package org.quiltmc.qsl.recipe.api.data
Class ShapelessRecipeData.Builder
java.lang.Object
org.quiltmc.qsl.recipe.api.data.ShapelessRecipeData.Builder
- Enclosing class:
ShapelessRecipeData
Convenience class for creating
ShapelessRecipeData instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates a newShapelessRecipeDatainstance as specified by this builder.category(net.minecraft.recipe.CraftingCategory category) Sets the recipe's category.Sets the recipe's group.ingredient(Iterable<net.minecraft.item.Item> items) Adds an ingredient accepting the passeditemsto the recipe.ingredient(net.minecraft.item.Item... items) ingredient(net.minecraft.registry.tag.TagKey<net.minecraft.item.Item> tag) Adds an ingredient accepting items in the passedtag.result(net.minecraft.item.ItemStack result) Sets the recipe's result.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
group
Sets the recipe's group.The default value is "".
- Parameters:
group- the group- Returns:
- this builder
-
category
Sets the recipe's category.The default value is
ShapelessRecipeData.DEFAULT_CATEGORY.- Parameters:
category- the category- Returns:
- this builder
-
ingredient
Adds an ingredient accepting the passeditemsto the recipe.Between 1 and 9 must be specified before building.
- Parameters:
items- the items the ingredient will accept- Returns:
- this builder
- See Also:
-
ingredient
- See Also:
-
ingredient
public ShapelessRecipeData.Builder ingredient(net.minecraft.registry.tag.TagKey<net.minecraft.item.Item> tag) Adds an ingredient accepting items in the passedtag.Between 1 and 9 must be specified before building.
- Parameters:
tag- the tag containing items the ingredient will accept- Returns:
- this builder
- See Also:
-
result
Sets the recipe's result.There is no default value; a result must be specified before building.
- Parameters:
result- the result- Returns:
- this builder
-
build
Creates a newShapelessRecipeDatainstance as specified by this builder.A result and between 1 and 9 ingredients must be specified before building.
- Returns:
- the recipe data
-