public interface ItemIngredient
| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<Item> |
consumeOnCrafting(Item original,
CraftingGrid craftingGrid)
Performs any necessary actions when this ingredient is consumed due to crafting a single item.
|
static ItemIngredient |
forBlock(BlockFactory block)
Retrieves an ingredient to represent a specific block.
|
static ItemIngredient |
forDictionary(java.lang.String id)
Retrieves an ingredient to represent a dictionary entry.
|
static ItemIngredient |
forItem(ItemFactory item)
Retrieves an ingredient to represent a specific item.
|
static ItemIngredient |
forItem(java.lang.String itemId)
Retrieves an ingredient to represent a specific item.
|
java.util.Collection<Item> |
getExampleItems()
Returns a list of example items.
|
java.util.Collection<java.lang.String> |
getPossibleItemIds()
Returns a list of all items that could possibly match this ingredient.
|
java.util.Optional<java.lang.String> |
getTag()
Returns the ingredient tag.
|
boolean |
isSubsetOf(ItemIngredient ingredient)
Checks if this ingredient is a subset of another ingredient.
|
boolean |
matches(Item item)
Checks if this ingredient matches the given item.
|
ItemIngredient |
withTag(java.lang.String tag)
Sets the ingredient tag.
|
static ItemIngredient forBlock(BlockFactory block)
block - The blockstatic ItemIngredient forItem(ItemFactory item)
item - The itemstatic ItemIngredient forItem(java.lang.String itemId)
itemId - item IDstatic ItemIngredient forDictionary(java.lang.String id)
id - dictionary entry IDjava.util.Collection<java.lang.String> getPossibleItemIds()
java.util.Collection<Item> getExampleItems()
boolean isSubsetOf(ItemIngredient ingredient)
ingredient - The another ingredientboolean matches(Item item)
item - Item to checkjava.util.Optional<java.lang.String> getTag()
ItemIngredient withTag(java.lang.String tag)
tag - The ingredient tagjava.util.Optional<Item> consumeOnCrafting(Item original, CraftingGrid craftingGrid)
original - ingredientcraftingGrid - CraftingGrid usedItem, or an empty optional if the item was empty.