public class RecipeManager extends java.lang.Object implements IRecipeManager
Constructor and Description |
---|
RecipeManager(RecipeManagerInternal internal,
IModIdHelper modIdHelper) |
Modifier and Type | Method and Description |
---|---|
<T> void |
addRecipe(T recipe,
net.minecraft.util.ResourceLocation recipeCategoryUid)
Deprecated.
|
<V> IFocus<V> |
createFocus(IFocus.Mode mode,
V ingredient)
Returns a new focus.
|
<T> IRecipeLayoutDrawable |
createRecipeLayoutDrawable(IRecipeCategory<T> recipeCategory,
T recipe,
IFocus<?> focus)
Returns a drawable recipe layout, for addons that want to draw the layouts somewhere.
|
java.util.List<java.lang.Object> |
getRecipeCatalysts(IRecipeCategory<?> recipeCategory,
boolean includeHidden)
Returns an unmodifiable collection of ingredients that can craft the recipes from recipeCategory.
|
<V> java.util.List<IRecipeCategory<?>> |
getRecipeCategories(java.util.Collection<net.minecraft.util.ResourceLocation> recipeCategoryUids,
IFocus<V> focus,
boolean includeHidden)
Returns a list of Recipe Categories for the focus
|
<V> java.util.List<IRecipeCategory<?>> |
getRecipeCategories(IFocus<V> focus,
boolean includeHidden)
Returns a list of Recipe Categories for the focus.
|
IRecipeCategory<?> |
getRecipeCategory(net.minecraft.util.ResourceLocation recipeCategoryUid,
boolean includeHidden)
Returns the recipe category for the given UID.
|
<T,V> java.util.List<T> |
getRecipes(IRecipeCategory<T> recipeCategory,
IFocus<V> focus,
boolean includeHidden)
Returns a list of recipes in the recipeCategory that have the focus.
|
<T> void |
hideRecipe(T recipe,
net.minecraft.util.ResourceLocation recipeCategoryUid)
Hides a recipe so that it will not be displayed.
|
void |
hideRecipeCategory(net.minecraft.util.ResourceLocation recipeCategoryUid)
Hide an entire recipe category of recipes from JEI.
|
<T> void |
unhideRecipe(T recipe,
net.minecraft.util.ResourceLocation recipeCategoryUid)
Unhides a recipe that was hidden by
IRecipeManager.hideRecipe(Object, ResourceLocation)
This can be used by mods that create recipe progression. |
void |
unhideRecipeCategory(net.minecraft.util.ResourceLocation recipeCategoryUid)
Unhides a recipe category that was hidden by
IRecipeManager.hideRecipeCategory(ResourceLocation) . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRecipeCatalysts, getRecipeCategories, getRecipeCategories, getRecipeCategories, getRecipeCategory, getRecipes, getRecipes
public RecipeManager(RecipeManagerInternal internal, IModIdHelper modIdHelper)
public <V> IFocus<V> createFocus(IFocus.Mode mode, V ingredient)
IRecipeManager
createFocus
in interface IRecipeManager
@Deprecated public <T> void addRecipe(T recipe, net.minecraft.util.ResourceLocation recipeCategoryUid)
IRecipeManager
addRecipe
in interface IRecipeManager
@Nullable public IRecipeCategory<?> getRecipeCategory(net.minecraft.util.ResourceLocation recipeCategoryUid, boolean includeHidden)
IRecipeManager
getRecipeCategory
in interface IRecipeManager
public <V> java.util.List<IRecipeCategory<?>> getRecipeCategories(java.util.Collection<net.minecraft.util.ResourceLocation> recipeCategoryUids, @Nullable IFocus<V> focus, boolean includeHidden)
IRecipeManager
getRecipeCategories
in interface IRecipeManager
recipeCategoryUids
- a list of recipe category uids to retrievefocus
- an optional search focus to narrow the results onincludeHidden
- set true to include recipe categories that are hidden or have no recipes.public <V> java.util.List<IRecipeCategory<?>> getRecipeCategories(@Nullable IFocus<V> focus, boolean includeHidden)
IRecipeManager
getRecipeCategories
in interface IRecipeManager
focus
- an optional search focus to narrow the results onincludeHidden
- set true to include recipe categories that are hidden or have no recipes.public <T,V> java.util.List<T> getRecipes(IRecipeCategory<T> recipeCategory, @Nullable IFocus<V> focus, boolean includeHidden)
IRecipeManager
getRecipes
in interface IRecipeManager
recipeCategory
- the recipe category to find recipes infocus
- the current search focus, or null if there is no focus.includeHidden
- set true to include recipes that are hidden.public java.util.List<java.lang.Object> getRecipeCatalysts(IRecipeCategory<?> recipeCategory, boolean includeHidden)
IRecipeManager
IRecipeCatalystRegistration.addRecipeCatalyst(Object, ResourceLocation...)
.getRecipeCatalysts
in interface IRecipeManager
public <T> IRecipeLayoutDrawable createRecipeLayoutDrawable(IRecipeCategory<T> recipeCategory, T recipe, IFocus<?> focus)
IRecipeManager
createRecipeLayoutDrawable
in interface IRecipeManager
recipeCategory
- the recipe category that the recipe belongs torecipe
- the specific recipe to draw.focus
- the focus of the recipe layout.public <T> void hideRecipe(T recipe, net.minecraft.util.ResourceLocation recipeCategoryUid)
IRecipeManager
hideRecipe
in interface IRecipeManager
recipe
- the recipe to hide.recipeCategoryUid
- the unique ID for the recipe category this recipe is a part of.
See VanillaRecipeCategoryUid
for vanilla recipe category UIDs.IRecipeManager.unhideRecipe(Object, ResourceLocation)
public <T> void unhideRecipe(T recipe, net.minecraft.util.ResourceLocation recipeCategoryUid)
IRecipeManager
IRecipeManager.hideRecipe(Object, ResourceLocation)
This can be used by mods that create recipe progression.unhideRecipe
in interface IRecipeManager
recipe
- the recipe to unhide.recipeCategoryUid
- the unique ID for the recipe category this recipe is a part of.
See VanillaRecipeCategoryUid
for vanilla recipe category UIDs.IRecipeManager.hideRecipe(Object, ResourceLocation)
public void hideRecipeCategory(net.minecraft.util.ResourceLocation recipeCategoryUid)
IRecipeManager
hideRecipeCategory
in interface IRecipeManager
recipeCategoryUid
- the unique ID for the recipe categoryIRecipeManager.unhideRecipeCategory(ResourceLocation)
public void unhideRecipeCategory(net.minecraft.util.ResourceLocation recipeCategoryUid)
IRecipeManager
IRecipeManager.hideRecipeCategory(ResourceLocation)
.
This can be used by mods that create recipe progression.unhideRecipeCategory
in interface IRecipeManager
recipeCategoryUid
- the unique ID for the recipe categoryIRecipeManager.hideRecipeCategory(ResourceLocation)