I - The type of the item (e.g. Integer)S - The type of the item stack (e.g. LegacyItemStack)public abstract class ARecipeRegistry<I,S extends net.lenni0451.mcstructs.items.AItemStack<I,S>>
extends java.lang.Object
| Constructor and Description |
|---|
ARecipeRegistry(net.lenni0451.mcstructs.items.ItemRegistry<I,S> itemRegistry) |
| Modifier and Type | Method and Description |
|---|---|
abstract S |
findCraftingRecipe(ICraftingInventory<I,S> craftingInventory)
Find a crafting recipe for the given crafting inventory.
|
abstract S |
findFurnaceRecipe(S input)
Find a furnace recipe for the given input item stack.
|
java.util.List<ICraftingRecipe<I,S>> |
getCraftingRecipes() |
java.util.Map<S,S> |
getFurnaceRecipes() |
net.lenni0451.mcstructs.items.ItemRegistry<I,S> |
getItemRegistry() |
java.util.List<VillagerRecipe<I,S>> |
getVillagerRecipes() |
void |
registerCraftingRecipe(ICraftingRecipe<I,S> recipe)
Register a crafting recipe.
|
void |
registerFurnaceRecipe(S input,
S output)
Register a furnace recipe.
|
void |
registerVillagerRecipe(S input1,
S input2,
S output)
Register a villager recipe.
|
void |
registerVillagerRecipe(S input1,
S input2,
S output,
boolean enabled)
Register a villager recipe.
|
public net.lenni0451.mcstructs.items.ItemRegistry<I,S> getItemRegistry()
public java.util.List<ICraftingRecipe<I,S>> getCraftingRecipes()
public java.util.List<VillagerRecipe<I,S>> getVillagerRecipes()
public void registerCraftingRecipe(ICraftingRecipe<I,S> recipe)
recipe - The recipepublic void registerFurnaceRecipe(S input, S output)
input - The input item stackoutput - The output item stackpublic void registerVillagerRecipe(S input1, @Nullable S input2, S output)
input1 - The first input item stackinput2 - The second input item stackoutput - The output item stackpublic void registerVillagerRecipe(S input1, S input2, S output, boolean enabled)
input1 - The first input item stackinput2 - The second input item stackoutput - The output item stackenabled - If the recipe is enabled@Nullable public abstract S findCraftingRecipe(ICraftingInventory<I,S> craftingInventory)
craftingInventory - The crafting inventory