Search in sources :

Example 1 with RecipeWrapper

use of com.lowdragmc.multiblocked.jei.recipeppage.RecipeWrapper in project Multiblocked by Low-Drag-MC.

the class JEIPlugin method registerRecipes.

@Override
public void registerRecipes(@Nonnull IRecipeRegistration registration) {
    Multiblocked.LOGGER.info("JEI register");
    for (RecipeMap recipeMap : RecipeMap.RECIPE_MAP_REGISTRY.values()) {
        if (recipeMap == RecipeMap.EMPTY)
            continue;
        registration.addRecipes(recipeMap.recipes.values().stream().map(recipe -> new RecipeWidget(recipe, recipeMap.progressTexture)).map(RecipeWrapper::new).collect(Collectors.toList()), new ResourceLocation(Multiblocked.MODID, recipeMap.name));
    }
    MultiblockInfoCategory.registerRecipes(registration);
}
Also used : RecipeMap(com.lowdragmc.multiblocked.api.recipe.RecipeMap) MbdComponents(com.lowdragmc.multiblocked.api.registry.MbdComponents) IRecipeCatalystRegistration(mezz.jei.api.registration.IRecipeCatalystRegistration) RecipeWidget(com.lowdragmc.multiblocked.api.gui.recipe.RecipeWidget) RecipeWrapper(com.lowdragmc.multiblocked.jei.recipeppage.RecipeWrapper) IJeiRuntime(mezz.jei.api.runtime.IJeiRuntime) MultiblockInfoCategory(com.lowdragmc.multiblocked.jei.multipage.MultiblockInfoCategory) IRecipeCategoryRegistration(mezz.jei.api.registration.IRecipeCategoryRegistration) Collectors(java.util.stream.Collectors) RecipeMapCategory(com.lowdragmc.multiblocked.jei.recipeppage.RecipeMapCategory) ArrayList(java.util.ArrayList) IModPlugin(mezz.jei.api.IModPlugin) IJeiHelpers(mezz.jei.api.helpers.IJeiHelpers) ItemStack(net.minecraft.item.ItemStack) List(java.util.List) JeiPlugin(mezz.jei.api.JeiPlugin) IModIngredientRegistration(mezz.jei.api.registration.IModIngredientRegistration) IRecipeRegistration(mezz.jei.api.registration.IRecipeRegistration) ComponentDefinition(com.lowdragmc.multiblocked.api.definition.ComponentDefinition) ResourceLocation(net.minecraft.util.ResourceLocation) Multiblocked(com.lowdragmc.multiblocked.Multiblocked) VanillaTypes(mezz.jei.api.constants.VanillaTypes) Nonnull(javax.annotation.Nonnull) ResourceLocation(net.minecraft.util.ResourceLocation) RecipeWidget(com.lowdragmc.multiblocked.api.gui.recipe.RecipeWidget) RecipeWrapper(com.lowdragmc.multiblocked.jei.recipeppage.RecipeWrapper) RecipeMap(com.lowdragmc.multiblocked.api.recipe.RecipeMap)

Aggregations

Multiblocked (com.lowdragmc.multiblocked.Multiblocked)1 ComponentDefinition (com.lowdragmc.multiblocked.api.definition.ComponentDefinition)1 RecipeWidget (com.lowdragmc.multiblocked.api.gui.recipe.RecipeWidget)1 RecipeMap (com.lowdragmc.multiblocked.api.recipe.RecipeMap)1 MbdComponents (com.lowdragmc.multiblocked.api.registry.MbdComponents)1 MultiblockInfoCategory (com.lowdragmc.multiblocked.jei.multipage.MultiblockInfoCategory)1 RecipeMapCategory (com.lowdragmc.multiblocked.jei.recipeppage.RecipeMapCategory)1 RecipeWrapper (com.lowdragmc.multiblocked.jei.recipeppage.RecipeWrapper)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Collectors (java.util.stream.Collectors)1 Nonnull (javax.annotation.Nonnull)1 IModPlugin (mezz.jei.api.IModPlugin)1 JeiPlugin (mezz.jei.api.JeiPlugin)1 VanillaTypes (mezz.jei.api.constants.VanillaTypes)1 IJeiHelpers (mezz.jei.api.helpers.IJeiHelpers)1 IModIngredientRegistration (mezz.jei.api.registration.IModIngredientRegistration)1 IRecipeCatalystRegistration (mezz.jei.api.registration.IRecipeCatalystRegistration)1 IRecipeCategoryRegistration (mezz.jei.api.registration.IRecipeCategoryRegistration)1 IRecipeRegistration (mezz.jei.api.registration.IRecipeRegistration)1