public static interface Ingredient.Builder extends ResettableBuilder<Ingredient,Ingredient.Builder>
Ingredients.| Modifier and Type | Method and Description |
|---|---|
Ingredient |
build()
Builds the
Ingredient with the specified items and or predicates. |
default Ingredient.Builder |
with(GameDictionary.Entry entry)
Adds a GameDictionary Entry as Predicate for matching the ingredient.
|
Ingredient.Builder |
with(ItemStack... items)
Adds one or more ItemStacks for matching the ingredient.
|
Ingredient.Builder |
with(ItemStackSnapshot... items)
Adds one or more ItemStackSnapshots for matching the ingredient.
|
Ingredient.Builder |
with(ItemType... types)
Adds one or more ItemTypes for matching the ingredient.
|
Ingredient.Builder |
with(Predicate<ItemStack> predicate)
Adds a predicate for matching the ingredient.
|
Ingredient.Builder |
withDisplay(ItemStack... items)
Adds ItemStacks used to display this Ingredient in a recipe.
|
Ingredient.Builder |
withDisplay(ItemStackSnapshot... items)
Adds ItemStackSnasphots used to display this Ingredient in a recipe.
|
Ingredient.Builder |
withDisplay(ItemType... types)
Adds ItemTypes used to display this Ingredient in a recipe.
|
from, resetIngredient.Builder with(Predicate<ItemStack> predicate)
Also clears all previously set withDisplay(org.spongepowered.api.item.ItemType...) items.
All predicates and items are ORed together.
Use ResettableBuilder.from(T) to create an ingredient from another one.
predicate - The predicate.default Ingredient.Builder with(GameDictionary.Entry entry)
withDisplay(org.spongepowered.api.item.ItemType...) items and then
adds GameDictionary.Entry.getTemplate()
to it.
All predicates and items are ORed together.
entry - The GameDictionary entry.Ingredient.Builder with(ItemType... types)
types - The itemsIngredient.Builder with(ItemStack... items)
items - The itemsIngredient.Builder with(ItemStackSnapshot... items)
items - The itemsIngredient.Builder withDisplay(ItemType... types)
types - The list of itemTypes.Ingredient.Builder withDisplay(ItemStack... items)
items - The list of items.Ingredient.Builder withDisplay(ItemStackSnapshot... items)
items - The list of snapshots.Ingredient build()
Ingredient with the specified items and or predicates.