Interface Ingredient.Builder
-
- All Superinterfaces:
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 forIngredient
s.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Ingredient
build()
Builds theIngredient
with the specified items and or predicates.Ingredient.Builder
with(Supplier<? extends ItemType>... types)
Sets one or more ItemTypes for matching the ingredient.Ingredient.Builder
with(ItemStack... types)
Sets one ore more ItemStack for matching the ingredient.Ingredient.Builder
with(ItemStackSnapshot... types)
Sets one ItemStack for matching the ingredient.Ingredient.Builder
with(ItemType... types)
Sets one or more ItemTypes for matching the ingredient.Ingredient.Builder
with(ResourceKey itemTag)
Sets the item tag for matching the ingredient.Ingredient.Builder
with(ResourceKey resourceKey, 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(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, 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 theIngredient
with the specified items and or predicates.- Specified by:
build
in interfaceBuildable.Builder<Ingredient>
- Returns:
- The new Ingredient
-
-