// Path: src/java/cd4017be/kineng/Main.java
// @Mod(modid = Main.ID, useMetadata = true)
// public class Main {
// 
// 	public static final String ID = "kineng";
// 
// 	@Instance(ID)
// 	public static Main instance;
// 
// 	public static Logger LOG;
// 
// 	@SidedProxy(clientSide = "cd4017be." + ID + ".ClientProxy", serverSide = "cd4017be." + ID + ".CommonProxy")
// 	public static CommonProxy proxy;
// 
// 	public Main() {
// 		RecipeScriptContext.scriptRegistry.add(new Version("kinetic", "/assets/" + ID + "/config/recipes.rcp"));
// 	}
// 
// 	@Mod.EventHandler
// 	public void preInit(FMLPreInitializationEvent event) {
// 		LOG = event.getModLog();
// 		proxy.preInit();
// 		StructureLocations.register();
// 		RecipeScriptContext.instance.run("kinetic.PRE_INIT");
// 	}
// 
// 	@Mod.EventHandler
// 	public void load(FMLInitializationEvent event) {
// 		Objects.init();
// 		proxy.init(new ConfigConstants(RecipeScriptContext.instance.modules.get("kinetic")));
// 	}
// 
// 	@Mod.EventHandler
// 	public void postInit(FMLPostInitializationEvent event) {
// 		Ticking.init();
// 	}
// 
// 	@Mod.EventHandler
// 	public void onShutdown(FMLServerStoppingEvent event) {
// 		Ticking.clear();
// 	}
// 
// }
// 
// Path: src/java/cd4017be/kineng/recipe/ProcessingRecipes.java
// public class ProcessingRecipes implements IRecipeHandler {
// 
// 	public final HashMap<ItemKey, KineticRecipe> recipes = new HashMap<>();
// 	public final String name;
// 
// 	public ProcessingRecipes(int type, String name) {
// 		this.name = name;
// 		type >>= 8;
// 		if (type >= recipeList.length)
// 			recipeList = Arrays.copyOf(recipeList, recipeList.length << 1);
// 		recipeList[type] = this;
// 	}
// 
// 	public KineticRecipe get(ItemStack ing) {
// 		KineticRecipe rcp = recipes.get(new ItemKey(ing));
// 		if (rcp == null && ing.getHasSubtypes())
// 			rcp = recipes.get(new ItemKey(new ItemStack(ing.getItem(), 1, OreDictionary.WILDCARD_VALUE)));
// 		return rcp;
// 	}
// 
// 	public void add(KineticRecipe rcp) {
// 		recipes.put(new ItemKey(rcp.io[0]), rcp);
// 	}
// 
// 	@Override
// 	public void addRecipe(Parameters param) {
// 		Object[] out = param.getArrayOrAll(4);
// 		KineticRecipe rcp = new KineticRecipe(param.getNumber(3), param.getNumber(2), new ItemStack[out.length + 1]);
// 		System.arraycopy(out, 0, rcp.io, 1, out.length);
// 		Object o;
// 		if (param.param[1] instanceof OreDictStack)
// 			o = ((OreDictStack)param.param[1]).getItems();
// 		else o = param.get(1);
// 		for (Object e : o instanceof Object[] ? (Object[])o : new Object[] {o})
// 			if (e instanceof ItemStack && !((ItemStack)e).isEmpty()) {
// 				if (rcp.io[0] == null) rcp.io[0] = (ItemStack)e;
// 				recipes.put(new ItemKey((ItemStack)e), rcp);
// 			}
// 	}
// 
// 	public String jeiName() {
// 		return Main.ID + ":" + name;
// 	}
// 
// 	public static ProcessingRecipes[] recipeList = new ProcessingRecipes[16];
// 	public static final ProcessingRecipes SAWMILL = new ProcessingRecipes(T_SAWBLADE, "sawmill");
// 	public static final ProcessingRecipes GRINDER = new ProcessingRecipes(T_GRINDER, "grinder");
// 	public static final ProcessingRecipes LATHE = new ProcessingRecipes(T_ANGULAR, "lathe");
// 	public static final ProcessingRecipes PRESS = new ProcessingRecipes(T_BELT, "press");
// 	public static IntConsumer JEI_SHOW_RECIPES;
// 	public static final ResourceLocation GUI_TEX = new ResourceLocation(Main.ID, "textures/gui/processing.png");
// 
// 	public static ProcessingRecipes getRecipeList(int mode) {
// 		mode >>>= 8;
// 		return mode < recipeList.length ? recipeList[mode] : null;
// 	}
// 
// }


import cd4017be.kineng.Main;
import cd4017be.kineng.recipe.ProcessingRecipes;
import cd4017be.lib.util.TooltipUtil;
import mezz.jei.api.IGuiHelper;
import mezz.jei.api.gui.*;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.client.Minecraft;

package cd4017be.kineng.jeiPlugin;



/**
 * @author CD4017BE
 *
 */
public class KineticCategory  implements IRecipeCategory<KineticRecipeW> {


	public final String uid;
	final IDrawable icon;
	final String title;

	public KineticCategory(IGuiHelper guiHelper, String uid, int type) {
		this.uid = uid;

// Path: src/java/cd4017be/kineng/Main.java
// @Mod(modid = Main.ID, useMetadata = true)
// public class Main {
// 
// 	public static final String ID = "kineng";
// 
// 	@Instance(ID)
// 	public static Main instance;
// 
// 	public static Logger LOG;
// 
// 	@SidedProxy(clientSide = "cd4017be." + ID + ".ClientProxy", serverSide = "cd4017be." + ID + ".CommonProxy")
// 	public static CommonProxy proxy;
// 
// 	public Main() {
// 		RecipeScriptContext.scriptRegistry.add(new Version("kinetic", "/assets/" + ID + "/config/recipes.rcp"));
// 	}
// 
// 	@Mod.EventHandler
// 	public void preInit(FMLPreInitializationEvent event) {
// 		LOG = event.getModLog();
// 		proxy.preInit();
// 		StructureLocations.register();
// 		RecipeScriptContext.instance.run("kinetic.PRE_INIT");
// 	}
// 
// 	@Mod.EventHandler
// 	public void load(FMLInitializationEvent event) {
// 		Objects.init();
// 		proxy.init(new ConfigConstants(RecipeScriptContext.instance.modules.get("kinetic")));
// 	}
// 
// 	@Mod.EventHandler
// 	public void postInit(FMLPostInitializationEvent event) {
// 		Ticking.init();
// 	}
// 
// 	@Mod.EventHandler
// 	public void onShutdown(FMLServerStoppingEvent event) {
// 		Ticking.clear();
// 	}
// 
// }
// 
// Path: src/java/cd4017be/kineng/recipe/ProcessingRecipes.java
// public class ProcessingRecipes implements IRecipeHandler {
// 
// 	public final HashMap<ItemKey, KineticRecipe> recipes = new HashMap<>();
// 	public final String name;
// 
// 	public ProcessingRecipes(int type, String name) {
// 		this.name = name;
// 		type >>= 8;
// 		if (type >= recipeList.length)
// 			recipeList = Arrays.copyOf(recipeList, recipeList.length << 1);
// 		recipeList[type] = this;
// 	}
// 
// 	public KineticRecipe get(ItemStack ing) {
// 		KineticRecipe rcp = recipes.get(new ItemKey(ing));
// 		if (rcp == null && ing.getHasSubtypes())
// 			rcp = recipes.get(new ItemKey(new ItemStack(ing.getItem(), 1, OreDictionary.WILDCARD_VALUE)));
// 		return rcp;
// 	}
// 
// 	public void add(KineticRecipe rcp) {
// 		recipes.put(new ItemKey(rcp.io[0]), rcp);
// 	}
// 
// 	@Override
// 	public void addRecipe(Parameters param) {
// 		Object[] out = param.getArrayOrAll(4);
// 		KineticRecipe rcp = new KineticRecipe(param.getNumber(3), param.getNumber(2), new ItemStack[out.length + 1]);
// 		System.arraycopy(out, 0, rcp.io, 1, out.length);
// 		Object o;
// 		if (param.param[1] instanceof OreDictStack)
// 			o = ((OreDictStack)param.param[1]).getItems();
// 		else o = param.get(1);
// 		for (Object e : o instanceof Object[] ? (Object[])o : new Object[] {o})
// 			if (e instanceof ItemStack && !((ItemStack)e).isEmpty()) {
// 				if (rcp.io[0] == null) rcp.io[0] = (ItemStack)e;
// 				recipes.put(new ItemKey((ItemStack)e), rcp);
// 			}
// 	}
// 
// 	public String jeiName() {
// 		return Main.ID + ":" + name;
// 	}
// 
// 	public static ProcessingRecipes[] recipeList = new ProcessingRecipes[16];
// 	public static final ProcessingRecipes SAWMILL = new ProcessingRecipes(T_SAWBLADE, "sawmill");
// 	public static final ProcessingRecipes GRINDER = new ProcessingRecipes(T_GRINDER, "grinder");
// 	public static final ProcessingRecipes LATHE = new ProcessingRecipes(T_ANGULAR, "lathe");
// 	public static final ProcessingRecipes PRESS = new ProcessingRecipes(T_BELT, "press");
// 	public static IntConsumer JEI_SHOW_RECIPES;
// 	public static final ResourceLocation GUI_TEX = new ResourceLocation(Main.ID, "textures/gui/processing.png");
// 
// 	public static ProcessingRecipes getRecipeList(int mode) {
// 		mode >>>= 8;
// 		return mode < recipeList.length ? recipeList[mode] : null;
// 	}
// 
// }


// Path: src/java/cd4017be/kineng/jeiPlugin/KineticCategory.java
import cd4017be.kineng.Main;
import cd4017be.kineng.recipe.ProcessingRecipes;
import cd4017be.lib.util.TooltipUtil;
import mezz.jei.api.IGuiHelper;
import mezz.jei.api.gui.*;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.client.Minecraft;

package cd4017be.kineng.jeiPlugin;



/**
 * @author CD4017BE
 *
 */
public class KineticCategory  implements IRecipeCategory<KineticRecipeW> {


	public final String uid;
	final IDrawable icon;
	final String title;

	public KineticCategory(IGuiHelper guiHelper, String uid, int type) {
		this.uid = uid;

		this.icon = guiHelper.createDrawable(ProcessingRecipes.GUI_TEX, 208, type * 16, 16, 16);
