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)
IRecipeRegistry
createFocus
in interface IRecipeRegistry
public void addRecipe(@Nullable java.lang.Object recipe)
IRecipeRegistry
IRecipeHandler.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 IRecipeRegistry
public Ingredients getIngredients(IRecipeWrapper recipeWrapper)
public void removeRecipe(java.lang.Object recipe)
IRecipeRegistry
removeRecipe
in interface IRecipeRegistry
public void addSmeltingRecipe(java.util.List<net.minecraft.item.ItemStack> inputs, net.minecraft.item.ItemStack output)
IRecipeRegistry
FurnaceRecipes.smeltingList
are already added by JEI.addSmeltingRecipe
in interface IRecipeRegistry
public java.util.List<IRecipeCategory> getRecipeCategories()
IRecipeRegistry
getRecipeCategories
in interface IRecipeRegistry
public com.google.common.collect.ImmutableList<IRecipeCategory> getRecipeCategories(@Nullable java.util.List<java.lang.String> recipeCategoryUids)
IRecipeRegistry
getRecipeCategories
in interface IRecipeRegistry
@Nullable public <T> IRecipeHandler<T> getRecipeHandler(@Nullable java.lang.Class<? extends T> recipeClass)
IRecipeRegistry
getRecipeHandler
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)
IRecipeRegistry
getRecipeCategories
in interface IRecipeRegistry
@Deprecated public <V> java.util.List<java.lang.Object> getRecipes(@Nullable IRecipeCategory recipeCategory, @Nullable IFocus<V> focus)
IRecipeRegistry
getRecipes
in interface IRecipeRegistry
public <T extends IRecipeWrapper,V> java.util.List<T> getRecipeWrappers(@Nullable IRecipeCategory<T> recipeCategory, @Nullable IFocus<V> focus)
IRecipeRegistry
getRecipeWrappers
in interface IRecipeRegistry
public <T extends IRecipeWrapper> java.util.List<T> getRecipeWrappers(@Nullable IRecipeCategory<T> recipeCategory)
IRecipeRegistry
getRecipeWrappers
in interface IRecipeRegistry
@Deprecated public java.util.List<IRecipeCategory> getRecipeCategoriesWithInput(@Nullable net.minecraft.item.ItemStack input)
IRecipeRegistry
getRecipeCategoriesWithInput
in interface IRecipeRegistry
@Deprecated public java.util.List<IRecipeCategory> getRecipeCategoriesWithInput(@Nullable net.minecraftforge.fluids.FluidStack input)
IRecipeRegistry
getRecipeCategoriesWithInput
in interface IRecipeRegistry
@Deprecated public java.util.List<IRecipeCategory> getRecipeCategoriesWithOutput(@Nullable net.minecraft.item.ItemStack output)
IRecipeRegistry
getRecipeCategoriesWithOutput
in interface IRecipeRegistry
@Deprecated public java.util.List<IRecipeCategory> getRecipeCategoriesWithOutput(@Nullable net.minecraftforge.fluids.FluidStack output)
IRecipeRegistry
getRecipeCategoriesWithOutput
in interface IRecipeRegistry
@Deprecated public java.util.List<java.lang.Object> getRecipesWithInput(@Nullable IRecipeCategory recipeCategory, @Nullable net.minecraft.item.ItemStack input)
IRecipeRegistry
getRecipesWithInput
in interface IRecipeRegistry
@Deprecated public java.util.List<java.lang.Object> getRecipesWithInput(@Nullable IRecipeCategory recipeCategory, @Nullable net.minecraftforge.fluids.FluidStack input)
IRecipeRegistry
getRecipesWithInput
in interface IRecipeRegistry
@Deprecated public java.util.List<java.lang.Object> getRecipesWithOutput(@Nullable IRecipeCategory recipeCategory, @Nullable net.minecraft.item.ItemStack output)
IRecipeRegistry
getRecipesWithOutput
in interface IRecipeRegistry
@Deprecated public java.util.List<java.lang.Object> getRecipesWithOutput(@Nullable IRecipeCategory recipeCategory, @Nullable net.minecraftforge.fluids.FluidStack output)
IRecipeRegistry
getRecipesWithOutput
in interface IRecipeRegistry
@Deprecated public java.util.List<java.lang.Object> getRecipes(@Nullable IRecipeCategory recipeCategory)
IRecipeRegistry
getRecipes
in interface IRecipeRegistry
@Deprecated public com.google.common.collect.ImmutableCollection<net.minecraft.item.ItemStack> getCraftingItems(IRecipeCategory recipeCategory)
IRecipeRegistry
IModRegistry.addRecipeCategoryCraftingItem(ItemStack, String...)
.getCraftingItems
in interface IRecipeRegistry
public java.util.List<net.minecraft.item.ItemStack> getCraftingItems(IRecipeCategory recipeCategory, IFocus focus)
IRecipeRegistry
IModRegistry.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)
IRecipeRegistry
getRecipeTransferHandler
in interface IRecipeRegistry
container
- 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)
IRecipeRegistry
createRecipeLayoutDrawable
in interface IRecipeRegistry
recipeCategory
- the recipe category that the recipe belongs torecipeWrapper
- the specific recipe wrapper to draw.focus
- the focus of the recipe layout.