/**
 * This file is a part of FrogCraftRebirth, 
 * created by 3TUSK at 5:56:52 PM, Jul 23, 2016, 
 * FrogCraftRebirth, is open-source under MIT license,
 * check https://github.com/FrogCraft-Rebirth/
 * FrogCraft-Rebirth/LICENSE_FrogCraft_Rebirth for 
 * more information.
 */
package frogcraftrebirth.common.compat.jei;

import frogcraftrebirth.api.FrogAPI;
import frogcraftrebirth.api.ICompatModuleFrog;
import frogcraftrebirth.client.gui.GuiCondenseTower;
import frogcraftrebirth.client.gui.GuiMPS;
import frogcraftrebirth.client.gui.GuiPyrolyzer;
import frogcraftrebirth.common.FrogBlocks;
import mezz.jei.api.IJeiRuntime;
import mezz.jei.api.IModPlugin;
import mezz.jei.api.IModRegistry;
import mezz.jei.api.JEIPlugin;
import mezz.jei.api.recipe.VanillaRecipeCategoryUid;
import net.minecraft.item.ItemStack;

@JEIPlugin
public class CompatJEI implements IModPlugin, ICompatModuleFrog {

	@Override
	public void init() {
		FrogAPI.FROG_LOG.info("Detected JustEnoughItems, compability will be enabled automatically.");
	}

	@Override
	public void register(IModRegistry registry) {
		//registry.addRecipeHandlers(new HandlerAdvChemReactor());
		registry.addRecipeHandlers(new HandlerCondensation());
		registry.addRecipeHandlers(new HandlerPyrolyzation());
		
		//registry.addRecipeCategories(new CategoryChemReaction());
		registry.addRecipeCategories(new CategoryCondensation(registry.getJeiHelpers().getGuiHelper()));
		registry.addRecipeCategories(new CategoryPyrolyzation(registry.getJeiHelpers().getGuiHelper()));
		
		registry.addRecipeCategoryCraftingItem(new ItemStack(FrogBlocks.condenseTowerPart, 1, 0), "frogcraftrebirth.condensation");
		
		registry.addRecipes(RecipeCondensation.getWrappedRecipeList());
		registry.addRecipes(RecipePyrolyzation.getWrappedRecipeList());
		
		registry.addRecipeClickArea(GuiMPS.class, 39, 47, 24, 16, VanillaRecipeCategoryUid.SMELTING, VanillaRecipeCategoryUid.FUEL);
		registry.addRecipeClickArea(GuiCondenseTower.class, 109, 30, 13, 12, "frogcraftrebirth.condensation");
		registry.addRecipeClickArea(GuiPyrolyzer.class, 45, 29, 24, 17, "frogcraftrebirth.pyrolyzation");
	}

	@Override
	public void onRuntimeAvailable(IJeiRuntime jeiRuntime) {
		
	}

}

@@ -1125,11 +1125,8 @@
 dler
-Adv
 Chem
@@ -1130,18 +1130,19 @@
 hemReact
-or
+ion
 ());%0A%09%09r
@@ -1514,24 +1514,143 @@
 per()));%0A%09%09%0A
+%09%09//registry.addRecipeCategoryCraftingItem(new ItemStack(FrogBlocks.machines, 1, 0), %22frogcraftrebirth.chemreaction%22);%0A
 %09%09registry.a
@@ -1761,24 +1761,209 @@
 sation%22);%0A%09%09
+registry.addRecipeCategoryCraftingItem(new ItemStack(FrogBlocks.machines, 1, 2), %22frogcraftrebirth.pyrolyzation%22);%0A%09%09%0A%09%09//registry.addRecipes(RecipeChenReaction.getWrappedRecipeList());
 %0A%09%09registry.
@@ -2213,16 +2213,119 @@
 .FUEL);%0A
+%09%09//registry.addRecipeClickArea(GuiAdvChemReactor.class, ?, ?, ?, ?, %22frogcraftrebirth.chemreaction%22);%0A
 %09%09regist

Add pyrolyzer icon on top of jei handler of pyrolysis