Interface Ingredient.Builder
-
- All Superinterfaces:
AbstractBuilder<Ingredient>,Buildable.Builder<Ingredient>,Builder<Ingredient,Ingredient.Builder>,ResettableBuilder<Ingredient,Ingredient.Builder>
- Enclosing interface:
- Ingredient
public static interface Ingredient.Builder extends Builder<Ingredient,Ingredient.Builder>
Builder forIngredients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Ingredientbuild()Builds theIngredientwith the specified items and or predicates.Ingredient.Builderwith(java.util.function.Supplier<? extends ItemType>... types)Sets one or more ItemTypes for matching the ingredient.Ingredient.Builderwith(ItemStack... types)Sets one ore more ItemStack for matching the ingredient.Ingredient.Builderwith(ItemStackSnapshot... types)Sets one ItemStack for matching the ingredient.Ingredient.Builderwith(ItemType... types)Sets one or more ItemTypes for matching the ingredient.Ingredient.Builderwith(ResourceKey itemTag)Sets the item tag for matching the ingredient.Ingredient.Builderwith(ResourceKey resourceKey, java.util.function.Predicate<ItemStack> predicate, ItemStack... exemplaryTypes)Sets a Predicate for matching the ingredient.
-
-
-
Method Detail
-
with
Ingredient.Builder with(ItemType... types)
Sets one or more ItemTypes for matching the ingredient.- Parameters:
types- The items- Returns:
- This Builder, for chaining
-
with
Ingredient.Builder with(java.util.function.Supplier<? extends ItemType>... types)
Sets one or more ItemTypes for matching the ingredient.- Parameters:
types- The items- Returns:
- This Builder, for chaining
-
with
Ingredient.Builder with(ItemStack... types)
Sets one ore more ItemStack for matching the ingredient.- Parameters:
types- The items- Returns:
- This Builder, for chaining
-
with
Ingredient.Builder with(ResourceKey resourceKey, java.util.function.Predicate<ItemStack> predicate, ItemStack... exemplaryTypes)
Sets a Predicate for matching the ingredient.Exemplary types are used for the vanilla recipe book.
Note: Predicate ingredients may not be fully supported for all recipe types
- Parameters:
predicate- The predicateexemplaryTypes- The items- Returns:
- This Builder, for chaining
-
with
Ingredient.Builder with(ItemStackSnapshot... types)
Sets one ItemStack for matching the ingredient.- Parameters:
types- The items- Returns:
- This Builder, for chaining
-
with
Ingredient.Builder with(ResourceKey itemTag)
Sets the item tag for matching the ingredient.- Parameters:
itemTag- The item tag- Returns:
- This Builder, for chaining
-
build
Ingredient build()
Builds theIngredientwith the specified items and or predicates.- Specified by:
buildin interfaceAbstractBuilder<Ingredient>- Specified by:
buildin interfaceBuildable.Builder<Ingredient>- Returns:
- The new Ingredient
-
-