public class RecipeRegistry extends java.lang.Object implements IRecipeRegistry
| Constructor and Description |
|---|
RecipeRegistry(StackHelper stackHelper,
java.util.List<IRecipeCategory> recipeCategories,
java.util.List<IRecipeHandler> recipeHandlers,
com.google.common.collect.ImmutableTable<java.lang.Class,java.lang.String,IRecipeTransferHandler> recipeTransferHandlers,
java.util.List<java.lang.Object> recipes,
com.google.common.collect.Multimap<java.lang.Class<? extends net.minecraft.client.gui.inventory.GuiContainer>,RecipeClickableArea> recipeClickableAreasMap,
com.google.common.collect.Multimap<java.lang.String,net.minecraft.item.ItemStack> craftItemsForCategories,
IIngredientRegistry ingredientRegistry,
java.util.List<IRecipeRegistryPlugin> plugins) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRecipe(java.lang.Object recipe)
Add a new recipe while the game is running.
|
void |
addSmeltingRecipe(java.util.List<net.minecraft.item.ItemStack> inputs,
net.minecraft.item.ItemStack output)
Add a new smelting recipe while the game is running.
|
<V> IFocus<V> |
createFocus(IFocus.Mode mode,
V ingredient)
Returns a new focus.
|
<T extends IRecipeWrapper> |
createRecipeLayoutDrawable(IRecipeCategory<T> recipeCategory,
T recipeWrapper,
IFocus focus)
Returns a drawable recipe layout, for addons that want to draw the layouts somewhere.
|
com.google.common.collect.ImmutableCollection<net.minecraft.item.ItemStack> |
getCraftingItems(IRecipeCategory recipeCategory)
Deprecated.
|
java.util.List<net.minecraft.item.ItemStack> |
getCraftingItems(IRecipeCategory recipeCategory,
IFocus focus)
Returns an unmodifiable collection of ItemStacks that can craft the recipes from recipeCategory.
|
Ingredients |
getIngredients(IRecipeWrapper recipeWrapper) |
java.util.List<IRecipeCategory> |
getRecipeCategories()
Returns an unmodifiable list of all Recipe Categories
|
<V> java.util.List<IRecipeCategory> |
getRecipeCategories(IFocus<V> focus)
Returns a list of Recipe Categories for the focus.
|
com.google.common.collect.ImmutableList<IRecipeCategory> |
getRecipeCategories(java.util.List<java.lang.String> recipeCategoryUids)
Returns an unmodifiable list of Recipe Categories
|
java.util.List<IRecipeCategory> |
getRecipeCategoriesWithInput(net.minecraftforge.fluids.FluidStack input)
Deprecated.
|
java.util.List<IRecipeCategory> |
getRecipeCategoriesWithInput(net.minecraft.item.ItemStack input)
Deprecated.
|
java.util.List<IRecipeCategory> |
getRecipeCategoriesWithOutput(net.minecraftforge.fluids.FluidStack output)
Deprecated.
|
java.util.List<IRecipeCategory> |
getRecipeCategoriesWithOutput(net.minecraft.item.ItemStack output)
Deprecated.
|
RecipeClickableArea |
getRecipeClickableArea(net.minecraft.client.gui.inventory.GuiContainer gui,
int mouseX,
int mouseY) |
<T> IRecipeHandler<T> |
getRecipeHandler(java.lang.Class<? extends T> recipeClass)
Returns the IRecipeHandler associated with the recipeClass or null if there is none
|
java.util.List<java.lang.Object> |
getRecipes(IRecipeCategory recipeCategory)
Deprecated.
|
<V> java.util.List<java.lang.Object> |
getRecipes(IRecipeCategory recipeCategory,
IFocus<V> focus)
Deprecated.
|
java.util.List<java.lang.Object> |
getRecipesWithInput(IRecipeCategory recipeCategory,
net.minecraftforge.fluids.FluidStack input)
Deprecated.
|
java.util.List<java.lang.Object> |
getRecipesWithInput(IRecipeCategory recipeCategory,
net.minecraft.item.ItemStack input)
Deprecated.
|
java.util.List<java.lang.Object> |
getRecipesWithOutput(IRecipeCategory recipeCategory,
net.minecraftforge.fluids.FluidStack output)
Deprecated.
|
java.util.List<java.lang.Object> |
getRecipesWithOutput(IRecipeCategory recipeCategory,
net.minecraft.item.ItemStack output)
Deprecated.
|
IRecipeTransferHandler |
getRecipeTransferHandler(net.minecraft.inventory.Container container,
IRecipeCategory recipeCategory)
Returns the recipe transfer handler for the given container and category, if one exists.
|
<T extends IRecipeWrapper> |
getRecipeWrappers(IRecipeCategory<T> recipeCategory)
Returns a list of Recipe Wrappers in recipeCategory.
|
<T extends IRecipeWrapper,V> |
getRecipeWrappers(IRecipeCategory<T> recipeCategory,
IFocus<V> focus)
Returns a list of Recipe Wrappers in the recipeCategory that have the focus.
|
void |
removeRecipe(java.lang.Object recipe)
Remove a recipe while the game is running.
|
public RecipeRegistry(StackHelper stackHelper, java.util.List<IRecipeCategory> recipeCategories, java.util.List<IRecipeHandler> recipeHandlers, com.google.common.collect.ImmutableTable<java.lang.Class,java.lang.String,IRecipeTransferHandler> recipeTransferHandlers, java.util.List<java.lang.Object> recipes, com.google.common.collect.Multimap<java.lang.Class<? extends net.minecraft.client.gui.inventory.GuiContainer>,RecipeClickableArea> recipeClickableAreasMap, com.google.common.collect.Multimap<java.lang.String,net.minecraft.item.ItemStack> craftItemsForCategories, IIngredientRegistry ingredientRegistry, java.util.List<IRecipeRegistryPlugin> plugins)
public <V> IFocus<V> createFocus(IFocus.Mode mode, @Nullable V ingredient)
IRecipeRegistrycreateFocus in interface IRecipeRegistrypublic void addRecipe(@Nullable
java.lang.Object recipe)
IRecipeRegistryIRecipeHandler.isRecipeValid(Object) to determine which recipes are hidden, and when a recipe becomes valid you can add it here.
(note that IRecipeHandler.isRecipeValid(Object) must be true when the recipe is added here for it to work)addRecipe in interface IRecipeRegistrypublic Ingredients getIngredients(IRecipeWrapper recipeWrapper)
public void removeRecipe(java.lang.Object recipe)
IRecipeRegistryremoveRecipe in interface IRecipeRegistrypublic void addSmeltingRecipe(java.util.List<net.minecraft.item.ItemStack> inputs,
net.minecraft.item.ItemStack output)
IRecipeRegistryFurnaceRecipes.smeltingList are already added by JEI.addSmeltingRecipe in interface IRecipeRegistrypublic java.util.List<IRecipeCategory> getRecipeCategories()
IRecipeRegistrygetRecipeCategories in interface IRecipeRegistrypublic com.google.common.collect.ImmutableList<IRecipeCategory> getRecipeCategories(@Nullable java.util.List<java.lang.String> recipeCategoryUids)
IRecipeRegistrygetRecipeCategories in interface IRecipeRegistry@Nullable public <T> IRecipeHandler<T> getRecipeHandler(@Nullable java.lang.Class<? extends T> recipeClass)
IRecipeRegistrygetRecipeHandler in interface IRecipeRegistry@Nullable public RecipeClickableArea getRecipeClickableArea(net.minecraft.client.gui.inventory.GuiContainer gui, int mouseX, int mouseY)
public <V> java.util.List<IRecipeCategory> getRecipeCategories(@Nullable IFocus<V> focus)
IRecipeRegistrygetRecipeCategories in interface IRecipeRegistry@Deprecated
public <V> java.util.List<java.lang.Object> getRecipes(@Nullable
IRecipeCategory recipeCategory,
@Nullable
IFocus<V> focus)
IRecipeRegistrygetRecipes in interface IRecipeRegistrypublic <T extends IRecipeWrapper,V> java.util.List<T> getRecipeWrappers(@Nullable IRecipeCategory<T> recipeCategory, @Nullable IFocus<V> focus)
IRecipeRegistrygetRecipeWrappers in interface IRecipeRegistrypublic <T extends IRecipeWrapper> java.util.List<T> getRecipeWrappers(@Nullable IRecipeCategory<T> recipeCategory)
IRecipeRegistrygetRecipeWrappers in interface IRecipeRegistry@Deprecated public java.util.List<IRecipeCategory> getRecipeCategoriesWithInput(@Nullable net.minecraft.item.ItemStack input)
IRecipeRegistrygetRecipeCategoriesWithInput in interface IRecipeRegistry@Deprecated public java.util.List<IRecipeCategory> getRecipeCategoriesWithInput(@Nullable net.minecraftforge.fluids.FluidStack input)
IRecipeRegistrygetRecipeCategoriesWithInput in interface IRecipeRegistry@Deprecated public java.util.List<IRecipeCategory> getRecipeCategoriesWithOutput(@Nullable net.minecraft.item.ItemStack output)
IRecipeRegistrygetRecipeCategoriesWithOutput in interface IRecipeRegistry@Deprecated public java.util.List<IRecipeCategory> getRecipeCategoriesWithOutput(@Nullable net.minecraftforge.fluids.FluidStack output)
IRecipeRegistrygetRecipeCategoriesWithOutput in interface IRecipeRegistry@Deprecated
public java.util.List<java.lang.Object> getRecipesWithInput(@Nullable
IRecipeCategory recipeCategory,
@Nullable
net.minecraft.item.ItemStack input)
IRecipeRegistrygetRecipesWithInput in interface IRecipeRegistry@Deprecated
public java.util.List<java.lang.Object> getRecipesWithInput(@Nullable
IRecipeCategory recipeCategory,
@Nullable
net.minecraftforge.fluids.FluidStack input)
IRecipeRegistrygetRecipesWithInput in interface IRecipeRegistry@Deprecated
public java.util.List<java.lang.Object> getRecipesWithOutput(@Nullable
IRecipeCategory recipeCategory,
@Nullable
net.minecraft.item.ItemStack output)
IRecipeRegistrygetRecipesWithOutput in interface IRecipeRegistry@Deprecated
public java.util.List<java.lang.Object> getRecipesWithOutput(@Nullable
IRecipeCategory recipeCategory,
@Nullable
net.minecraftforge.fluids.FluidStack output)
IRecipeRegistrygetRecipesWithOutput in interface IRecipeRegistry@Deprecated
public java.util.List<java.lang.Object> getRecipes(@Nullable
IRecipeCategory recipeCategory)
IRecipeRegistrygetRecipes in interface IRecipeRegistry@Deprecated public com.google.common.collect.ImmutableCollection<net.minecraft.item.ItemStack> getCraftingItems(IRecipeCategory recipeCategory)
IRecipeRegistryIModRegistry.addRecipeCategoryCraftingItem(ItemStack, String...).getCraftingItems in interface IRecipeRegistrypublic java.util.List<net.minecraft.item.ItemStack> getCraftingItems(IRecipeCategory recipeCategory, IFocus focus)
IRecipeRegistryIModRegistry.addRecipeCategoryCraftingItem(ItemStack, String...).
This takes the current focus into account, so that if the focus mode is set to Input and the focus is included in the craftingItems, it is the only one returned.
getCraftingItems in interface IRecipeRegistry@Nullable public IRecipeTransferHandler getRecipeTransferHandler(@Nullable net.minecraft.inventory.Container container, @Nullable IRecipeCategory recipeCategory)
IRecipeRegistrygetRecipeTransferHandler in interface IRecipeRegistrycontainer - The container to transfer items in.recipeCategory - The type of recipe that the recipe transfer handler acts on.IRecipeTransferRegistry@Nullable public <T extends IRecipeWrapper> IRecipeLayoutDrawable createRecipeLayoutDrawable(IRecipeCategory<T> recipeCategory, T recipeWrapper, IFocus focus)
IRecipeRegistrycreateRecipeLayoutDrawable in interface IRecipeRegistryrecipeCategory - the recipe category that the recipe belongs torecipeWrapper - the specific recipe wrapper to draw.focus - the focus of the recipe layout.