public class ShapelessCraftingRecipe extends java.lang.Object implements CraftingRecipe
| Constructor and Description |
|---|
ShapelessCraftingRecipe(ItemFactory output,
ItemIngredient... ingredients) |
ShapelessCraftingRecipe(ItemFactory output,
RecipeFunction recipeFunction,
ItemIngredient... ingredients) |
| Modifier and Type | Method and Description |
|---|---|
void |
consumeItems(CraftingGrid craftingGrid)
Consumes items for the crafting of a single item.
|
java.util.Optional<Item> |
getCraftingResult(CraftingGrid craftingGrid)
Calculates the crafting result for the given crafting grid.
|
java.util.Optional<Item> |
getExampleOutput()
Gets a nominal (example) output for this recipe.
|
ItemIngredient[] |
getIngredients() |
boolean |
matches(CraftingGrid craftingGrid)
Checks if this crafting recipe matches the content of the given crafting
grid.
|
int |
size() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPossibleItemsInFirstSlotpublic ShapelessCraftingRecipe(ItemFactory output, ItemIngredient... ingredients)
public ShapelessCraftingRecipe(ItemFactory output, RecipeFunction recipeFunction, ItemIngredient... ingredients)
public int size()
public ItemIngredient[] getIngredients()
public boolean matches(CraftingGrid craftingGrid)
CraftingRecipematches in interface CraftingRecipecraftingGrid - crafting grid to read frompublic java.util.Optional<Item> getCraftingResult(CraftingGrid craftingGrid)
CraftingRecipegetCraftingResult in interface CraftingRecipecraftingGrid - crafting gridpublic void consumeItems(CraftingGrid craftingGrid)
CraftingRecipeconsumeItems in interface CraftingRecipecraftingGrid - crafting grid to modifypublic java.util.Optional<Item> getExampleOutput()
CraftingRecipegetExampleOutput in interface CraftingRecipe