/
IRecipeRegistry.java
81 lines (63 loc) · 3.21 KB
/
IRecipeRegistry.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package mezz.jei.api;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.List;
import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.Fluid;
import mezz.jei.api.recipe.IRecipeCategory;
import mezz.jei.api.recipe.IRecipeHandler;
import mezz.jei.api.recipe.transfer.IRecipeTransferInfo;
/**
* The IRecipeManager offers several functions for retrieving and handling recipes.
* The IRecipeManager instance is provided in JEIManager.
* Available to IModPlugins
*/
public interface IRecipeRegistry {
/** Returns the IRecipeHandler associated with the recipeClass or null if there is none */
@Nullable
IRecipeHandler getRecipeHandler(@Nonnull Class recipeClass);
/** Returns an unmodifiable list of Recipe Categories */
@Nonnull
List<IRecipeCategory> getRecipeCategories();
/** Returns an unmodifiable list of Recipe Categories that have the ItemStack as an input */
@Nonnull
List<IRecipeCategory> getRecipeCategoriesWithInput(@Nonnull ItemStack input);
/** Returns an unmodifiable list of Recipe Categories that have the Fluid as an input */
@Nonnull
List<IRecipeCategory> getRecipeCategoriesWithInput(@Nonnull Fluid input);
/** Returns an unmodifiable list of Recipe Categories that have the ItemStack as an output */
@Nonnull
List<IRecipeCategory> getRecipeCategoriesWithOutput(@Nonnull ItemStack output);
/** Returns an unmodifiable list of Recipe Categories that have the Fluid as an output */
@Nonnull
List<IRecipeCategory> getRecipeCategoriesWithOutput(@Nonnull Fluid output);
/** Returns an unmodifiable list of Recipes of recipeCategory that have the ItemStack as an input */
@Nonnull
List<Object> getRecipesWithInput(@Nonnull IRecipeCategory recipeCategory, @Nonnull ItemStack input);
/** Returns an unmodifiable list of Recipes of recipeCategory that have the Fluid as an input */
@Nonnull
List<Object> getRecipesWithInput(@Nonnull IRecipeCategory recipeCategory, @Nonnull Fluid input);
/** Returns an unmodifiable list of Recipes of recipeCategory that have the ItemStack as an output */
@Nonnull
List<Object> getRecipesWithOutput(@Nonnull IRecipeCategory recipeCategory, @Nonnull ItemStack output);
/** Returns an unmodifiable list of Recipes of recipeCategory that have the Fluid as an output */
@Nonnull
List<Object> getRecipesWithOutput(@Nonnull IRecipeCategory recipeCategory, @Nonnull Fluid output);
/** Returns an unmodifiable list of Recipes in recipeCategory */
@Nonnull
List<Object> getRecipes(@Nonnull IRecipeCategory recipeCategory);
/**
* Add a new recipe while the game is running.
* This is only for things like gated recipes becoming available, like the ones in Thaumcraft.
* Use your IRecipeHandler.isValid to determine which recipes are hidden, and when a recipe becomes valid you can add it here.
* (note that IRecipeHandler.isValid must be true when the recipe is added here for it to work)
*/
void addRecipe(@Nonnull Object recipe);
/**
* @deprecated this is internal to JEI
*/
@Deprecated
@Nullable
IRecipeTransferHelper getRecipeTransferHelper(@Nonnull Container container, @Nonnull IRecipeCategory recipeCategory);
}