Interface Ingredient.Builder
- All Superinterfaces:
AbstractBuilder<Ingredient>
,Builder<Ingredient,
,Ingredient.Builder> ResettableBuilder<Ingredient,
Ingredient.Builder>
- Enclosing interface:
Ingredient
Builder for
Ingredient
s.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds theIngredient
with the specified items and or predicates.Sets one or more ItemTypes for matching the ingredient.with
(ItemStackLike... types) Sets one or more ItemStackLike for matching the ingredient.Sets one or more ItemTypes for matching the ingredient.with
(ResourceKey itemTag) Sets the item tag for matching the ingredient.with
(ResourceKey resourceKey, Predicate<? super ItemStackLike> predicate, ItemStackLike... exemplaryTypes) Sets a Predicate for matching the ingredient.
-
Method Details
-
with
Sets one or more ItemTypes for matching the ingredient.- Parameters:
types
- The items- Returns:
- This Builder, for chaining
-
with
Sets one or more ItemTypes for matching the ingredient.- Parameters:
types
- The items- Returns:
- This Builder, for chaining
-
with
Sets one or more ItemStackLike for matching the ingredient.- Parameters:
types
- The items- Returns:
- This Builder, for chaining
-
with
Ingredient.Builder with(ResourceKey resourceKey, Predicate<? super ItemStackLike> predicate, ItemStackLike... 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
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 interfaceAbstractBuilder<Ingredient>
- Returns:
- The new Ingredient
-