public abstract class ForgeRecipeManager extends java.lang.Object implements IResourceManagerReloadListener
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<RecipeType<? extends IRecipe>,java.util.List<? extends IRecipe>> |
sortedRecipes
Master list of sorted recipes.
|
| Constructor and Description |
|---|
ForgeRecipeManager() |
| Modifier and Type | Method and Description |
|---|---|
<T extends IRecipe> |
getRecipe(IInventory input,
World world,
RecipeType<T> type)
Used to find a matching recipe for the given inv, world, and type.
|
<T extends IRecipe> |
getRecipes(RecipeType<T> type)
Returns all the recipes that match this type.
|
NonNullList<ItemStack> |
getRemainingItems(IInventory input,
World world,
RecipeType<?> type)
Deprecated.
|
ItemStack |
getResult(IInventory input,
World world,
RecipeType<?> type)
Automatically returns a result from the first recipe that matches this inv and type.
|
void |
onResourceManagerReload(IResourceManager resourceManager) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetResourceTypeprotected final java.util.Map<RecipeType<? extends IRecipe>,java.util.List<? extends IRecipe>> sortedRecipes
public void onResourceManagerReload(IResourceManager resourceManager)
onResourceManagerReload in interface IResourceManagerReloadListenerpublic <T extends IRecipe> java.util.List<T> getRecipes(RecipeType<T> type)
type - A recipe type.public ItemStack getResult(IInventory input, World world, RecipeType<?> type)
getRecipe(IInventory, World, RecipeType) since you get the recipe object itself.input - An inventory.world - The world.type - The type of recipe to match against.ItemStack.EMPTY if no recipes match.@Nullable public <T extends IRecipe> T getRecipe(IInventory input, World world, RecipeType<T> type)
RecipeWrapper to avoid direct implementation.
For crafting recipes, it is advised to still use InventoryCrafting. The dynamic vanilla recipes require they be crafted in one.input - An inventory.world - The world.type - The type of recipe to match against.@Deprecated public NonNullList<ItemStack> getRemainingItems(IInventory input, World world, RecipeType<?> type)
IRecipe.getRemainingItems(IInventory).