public class RecipeRegistry extends java.lang.Object implements IRecipeRegistry
| Constructor and Description |
|---|
RecipeRegistry(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<RecipeClickableArea> |
getAllRecipeClickableAreas(net.minecraft.client.gui.inventory.GuiContainer gui) |
java.util.List<net.minecraft.item.ItemStack> |
getCraftingItems(IRecipeCategory recipeCategory)
Returns an unmodifiable collection of ItemStacks that can craft the recipes from recipeCategory.
|
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
|
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
|
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(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, V ingredient)
IRecipeRegistrycreateFocus in interface IRecipeRegistrypublic void addRecipe(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(java.util.List<java.lang.String> recipeCategoryUids)
IRecipeRegistrygetRecipeCategories in interface IRecipeRegistry@Nullable public <T> IRecipeHandler<T> getRecipeHandler(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 com.google.common.collect.ImmutableCollection<RecipeClickableArea> getAllRecipeClickableAreas(net.minecraft.client.gui.inventory.GuiContainer gui)
public <V> java.util.List<IRecipeCategory> getRecipeCategories(IFocus<V> focus)
IRecipeRegistrygetRecipeCategories in interface IRecipeRegistrypublic <T extends IRecipeWrapper,V> java.util.List<T> getRecipeWrappers(IRecipeCategory<T> recipeCategory, IFocus<V> focus)
IRecipeRegistrygetRecipeWrappers in interface IRecipeRegistrypublic <T extends IRecipeWrapper> java.util.List<T> getRecipeWrappers(IRecipeCategory<T> recipeCategory)
IRecipeRegistrygetRecipeWrappers in interface IRecipeRegistrypublic java.util.List<net.minecraft.item.ItemStack> getCraftingItems(IRecipeCategory recipeCategory, @Nullable 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 IRecipeRegistrypublic java.util.List<net.minecraft.item.ItemStack> getCraftingItems(IRecipeCategory recipeCategory)
IRecipeRegistryIModRegistry.addRecipeCategoryCraftingItem(ItemStack, String...).getCraftingItems in interface IRecipeRegistry@Nullable public IRecipeTransferHandler getRecipeTransferHandler(net.minecraft.inventory.Container container, IRecipeCategory recipeCategory)
IRecipeRegistrygetRecipeTransferHandler in interface IRecipeRegistrycontainer - The container to transfer items in.recipeCategory - The type of recipe that the recipe transfer handler acts on.IRecipeTransferRegistrypublic <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.