public interface IRecipeHandler<T>
Its main purpose is to tie recipe classes to an IRecipeCategory
and convert recipes to IRecipeWrapper
with getRecipeWrapper(Object)
.
Plugins implement these to handle their recipes, and register them with IModRegistry.addRecipeHandlers(IRecipeHandler[])
.
You can find the registered Recipe Handler for a recipe class with IRecipeRegistry.getRecipeHandler(Class)
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getRecipeCategoryUid()
Deprecated.
since 3.5.0. Use
getRecipeCategoryUid(Object) |
java.lang.String |
getRecipeCategoryUid(T recipe)
Returns this recipe's unique category id.
|
java.lang.Class<T> |
getRecipeClass()
Returns the class of the Recipe handled by this IRecipeHandler.
|
IRecipeWrapper |
getRecipeWrapper(T recipe)
Returns a recipe wrapper for the given recipe.
|
boolean |
isRecipeValid(T recipe)
Returns true if a recipe is valid and can be used.
|
java.lang.Class<T> getRecipeClass()
@Deprecated java.lang.String getRecipeCategoryUid()
getRecipeCategoryUid(Object)
java.lang.String getRecipeCategoryUid(T recipe)
IRecipeCategory.getUid()
,
VanillaRecipeCategoryUid
IRecipeWrapper getRecipeWrapper(T recipe)
boolean isRecipeValid(T recipe)