-
Couldn't load subscription status.
- Fork 346
Recipe Wrappers
ErdbeerbaerLP edited this page Jul 19, 2019
·
5 revisions
A recipe wrapper takes a recipe and "wraps" it, and exposes properties that JEI needs in order to understand the recipe.
-
IRecipeWrapper.getIngredientsfills out a list of ingredients with a standard format.
- This is used by JEI to figure out what the recipe's inputs and outputs are, for ingredient lookups.
- Normally a wrapper has a recipe as a field internally, and the wrapper's job is to fill out the standard ingredient format by using information from the recipe.
- Draws information that is specific to the recipe.
- Examples:
- draw the number of brewing steps to reach the brewing products in the recipe
- draw the time taken to burn a fuel in the recipe
- draw the description of the item in the recipe
- Defines tooltips for specific areas on the recipe.
- One example is the ability to hover over the resource graph from JustEnoughResources to see more detailed information.
- Handles clicks for specific areas on the recipe.
- May be used for buttons or other functions.
There are several @Deprecated methods that don't need to be filled out. To avoid those and other optional methods, make sure your implementation extends BlankRecipeWrapper. Then it can just override the methods that are important and ignore the others.
The implementation here is centered around filling out IRecipeWrapper.getIngredients.
Take a look at recipe wrappers from the List of Plugin Implementations for a better understanding of how it works.
See IRecipeWrapper.
- Setup
- Item Ingredients
- Essential Extras
- Advanced
List of Plugin Implementations
- Setup
- Item Ingredients
- Working with Recipes
- Other