Skip to content
mezz edited this page Oct 26, 2016 · 5 revisions

Recipe Wrappers

A recipe wrapper takes a recipe an "wraps" it, and exposes properties that JEI needs in order to understand the recipe.

Responsibilities of a recipe wrapper:

  1. IRecipeWrapper.getIngredients fills 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 recipe wrapper has a regular recipe internally, and it's job is to fill out this standard ingredient format by using information from the recipe.

Optional Abilities of a recipe wrapper:

  1. 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
  1. 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.
  1. Handles clicks for specific areas on the recipe.
  • May be used for buttons or other functions.

Documentation

See IRecipeWrapper.

Clone this wiki locally