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:
- Minecraft 1.21 and 1.21.1: Recipes Overview
- Minecraft 1.12.2: Recipes Overview
- Minecraft 1.16.5, 1.18.2, 1.19.2, and 1.20.1: Recipes Overview
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:
- In
registerCategories, register anIRecipeCategoryfor the recipe type. - In
registerRecipes, callIRecipeRegistration.addRecipes(recipeType, recipes). - In
registerRecipeCatalysts, callIRecipeCatalystRegistration.addCraftingStation(recipeType, station)for the block or item that opens the recipe category. - In
registerRecipeTransferHandlers, register transfer support if the+button should move ingredients into your menu. - 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.