package techreborn.compat.jei;

import mezz.jei.api.IGuiHelper;
import mezz.jei.api.IItemRegistry;
import mezz.jei.api.IJeiHelpers;
import mezz.jei.api.IModPlugin;
import mezz.jei.api.IModRegistry;
import mezz.jei.api.IRecipeRegistry;
import techreborn.api.reactor.FusionReactorRecipeHelper;
import techreborn.compat.jei.fusionReactor.FusionReactorRecipeCategory;
import techreborn.compat.jei.fusionReactor.FusionReactorRecipeHandler;

@mezz.jei.api.JEIPlugin
public class TechRebornJeiPlugin implements IModPlugin {
    private IJeiHelpers jeiHelpers;

    @Override
    public boolean isModLoaded() {
        return true;
    }

    @Override
    public void onJeiHelpersAvailable(IJeiHelpers jeiHelpers) {
        this.jeiHelpers = jeiHelpers;
    }

    @Override
    public void onItemRegistryAvailable(IItemRegistry itemRegistry) {

    }

    @Override
    public void register(IModRegistry registry) {
        IGuiHelper guiHelper = jeiHelpers.getGuiHelper();

        registry.addRecipeCategories(
                new FusionReactorRecipeCategory(guiHelper)
        );

        registry.addRecipeHandlers(
                new FusionReactorRecipeHandler()
        );

        registry.addRecipes(FusionReactorRecipeHelper.reactorRecipes);
    }

    @Override
    public void onRecipeRegistryAvailable(IRecipeRegistry recipeRegistry) {

    }
}

@@ -239,55 +239,175 @@
 ort 
-techreborn.api.reactor.FusionReactorRecipeHelpe
+mezz.jei.api.recipe.transfer.IRecipeTransferRegistry;%0Aimport techreborn.api.reactor.FusionReactorRecipeHelper;%0Aimport techreborn.client.container.ContainerFusionReacto
 r;%0Ai
@@ -1358,16 +1358,251 @@
 ecipes);
+%0A%0A        IRecipeTransferRegistry recipeTransferRegistry = registry.getRecipeTransferRegistry();%0A        recipeTransferRegistry.addRecipeTransferHandler(ContainerFusionReactor.class, TechRebornCategoryUids.FUSION_REACTOR, 0, 2, 3, 36);
 %0A    %7D%0A%0A

Add RecipeTransferHandler for FusionReactor