Skip to content
James Mitchell edited this page Feb 11, 2017 · 6 revisions

Recipe Handlers

A recipe handler is the glue that lets JEI understand one recipe class.

Responsibilities of a recipe handler:

  1. Tell JEI about one specific recipe class.
  • The recipe's class. (example: ShapedOreRecipe.class)
  • The recipe's Recipe Category.
  1. Wrap recipes of that class into recipe wrappers.
  2. Validate recipes at runtime to make sure they should be shown to the player.

Optional Abilities of a recipe handler:

None

Implementation

This class is short and almost pure boilerplate. Just fill in the blanks with the right information for your recipe in order to connect it with the corresponding Recipe Wrapper and Recipe Category.

When checking if the recipe is valid, it's good practice to log errors you find. That way if a recipe is "missing" because it was invalid, there is at least a reason in the log that can be useful for debugging later.

Full Documentation

See IRecipeHandler.