Recipes Overview [Minecraft 1.21.11 to 26.2] - mezz/JustEnoughItems GitHub Wiki

[!NOTE] Version note: This page covers recipe integration for Minecraft 1.21.11, 26.1.2, and 26.2.

Other recipe overview pages:

Recipes Overview

Vanilla Recipes

JEI automatically includes many vanilla recipe types through RecipeTypes, including:

  • Crafting
  • Stonecutting
  • Smelting, smoking, blasting, and campfire cooking
  • Furnace, smoker, and blast furnace fuels
  • Brewing
  • Anvil, grindstone, and smithing
  • Composting
  • Ingredient information pages

If you need to customize how one of your vanilla crafting or smithing recipes displays, use registerVanillaCategoryExtensions.

Modded Recipes

For a custom machine or other custom recipe display, create a JEI recipe type and category.

public static final IRecipeType<CrusherRecipe> CRUSHING =
  IRecipeType.create("examplemod", "crushing", CrusherRecipe.class);

Then implement the plugin stages that match your integration:

  1. In registerCategories, register an IRecipeCategory for the recipe type.
  2. In registerRecipes, call IRecipeRegistration.addRecipes(recipeType, recipes).
  3. In registerRecipeCatalysts, call IRecipeCatalystRegistration.addCraftingStation(recipeType, station) for the block or item that opens the recipe category.
  4. In registerRecipeTransferHandlers, register transfer support if the + button should move ingredients into your menu.
  5. In registerGuiHandlers, add recipe click areas, ghost ingredient support, or screen exclusion areas for your GUI.

Example registration:

@Override
public void registerCategories(IRecipeCategoryRegistration registration) {
  IGuiHelper guiHelper = registration.getJeiHelpers().getGuiHelper();
  registration.addRecipeCategories(new CrusherRecipeCategory(guiHelper));
}

@Override
public void registerRecipes(IRecipeRegistration registration) {
  List<CrusherRecipe> recipes = getCrusherRecipes();
  registration.addRecipes(CRUSHING, recipes);
}

@Override
public void registerRecipeCatalysts(IRecipeCatalystRegistration registration) {
  registration.addCraftingStation(CRUSHING, ModBlocks.CRUSHER);
}

The recipe type must be the same object everywhere: the category's getRecipeType, addRecipes, addCraftingStation, recipe transfer handlers, and click areas should all refer to the same IRecipeType.