Skip to content

Recipes Overview [1.13 and Up]

sciwhiz12 edited this page Sep 5, 2022 · 4 revisions

Vanilla Recipes

JEI has built-in recipes for nearly everything related to crafting. This includes:

  • Anvil recipes (Applying enchanted books)
  • Potion brewing
  • All forms of smelting (campfire, furnace, smoker, and blast furnace)
  • Fuel for furnaces
  • Regular crafting table recipes
  • Stonecutter recipes

If the recipe you are adding is listed above, it is implemented in JEI as the Vanilla Plugin (using the same API as any other mod plugin). Otherwise, if your recipe is NOT listed above, it is a modded recipe.

Modded Recipes

At this point, if you haven't already, you'll want to create a plugin. Afterwards, you'll need to:

  1. (REQUIRED) Create a recipe category. Examples of categories already in Vanilla include "crafting", "cooking", etc. If you're using another mod's recipe category, this is not required.
  2. (PRACTICALLY REQUIRED) Register your recipes with the recipe category. This way, JEI knows that your mod's recipes are part of the category you're creating. This can be done in the registerRecipes function of your plugin, calling IRecipeRegistration.addRecipes(RECIPE_LIST, KEY). In this scenario, RECIPE_LIST is a Java Collection with all of the recipes in it, while KEY is the same ResourceLocation as you return from your recipe category's getUid() function.
  3. (OPTIONAL) Register a catalyst or catalysts for the recipe category. This way, JEI knows what to display as the block/item used for the crafting category (ie. Crafting tables for crafting, furnace for cooking, etc.). This can be done in your recipe's registerRecipeCatalysts function, calling IRecipeCatalystRegistration.addRecipeCatalyst(ItemStack, KEY). ItemStack is an ItemStack of the item you want to be the catalyst, while KEY is the same key from step 2.
  4. (OPTIONAL) Register a transfer handler for the recipe category. This way, the + button in JEI will transfer items properly. This can be done using the IRecipeTransferRegistration.addRecipeTransferHandler() function.