// Path: src/java/cd4017be/kineng/tileentity/IKineticLink.java
// public interface IKineticLink extends IShaftPart {
// 
// 	/** {@link #type()} bit-masks */
// 	public static final int T_TIER = 0xff, T_SHAPE = ~T_TIER;
// 	/** {@link #type()} standard shapes */
// 	public static final int
// 	T_ANGULAR = 0x000, T_BELT = 0x100, T_LINEAR = 0x200, T_MAGNETIC = 0x300,
// 	T_GRINDER = 0x400, T_SAWBLADE = 0x500;
// 
// 	/**@return the link type as a {@link #T_SHAPE} with a {@link #T_TIER}.
// 	 * Used to determine connection compatibility. */
// 	int type();
// 
// 	ForceCon getCon(EnumFacing side);
// 
// 	IForceProvider findLink(EnumFacing side);
// 
// 	@Override
// 	default double setShaft(ShaftAxis shaft, double v0) {
// 		v0 = IShaftPart.super.setShaft(shaft, v0);
// 		for(EnumFacing side : EnumFacing.values()) {
// 			ForceCon con = getCon(side);
// 			if(con == null) continue;
// 			con.setShaft(shaft);
// 			if (shaft == null)
// 				con.link(null);
// 		}
// 		return v0;
// 	}
// 
// 	@Override
// 	default void connect(boolean client) {
// 		if (invalid()) return;
// 		if (!client)
// 			for(EnumFacing side : VALUES)
// 				check(side);
// 		IShaftPart.super.connect(client);
// 	}
// 
// 	default void check(EnumFacing side) {
// 		ForceCon con = getCon(side);
// 		if(con == null) return;
// 		IForceProvider fp = findLink(side);
// 		con.link(fp == null ? null : fp.connect(this, side.getOpposite()));
// 	}
// 
// }
// 
// 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();
// 	}
// 
// }


import static cd4017be.kineng.tileentity.IKineticLink.*;
import java.util.*;
import java.util.function.*;
import cd4017be.api.recipes.RecipeAPI.IRecipeHandler;
import cd4017be.kineng.Main;
import cd4017be.lib.script.Parameters;
import cd4017be.lib.util.ItemKey;
import cd4017be.lib.util.OreDictStack;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.oredict.OreDictionary;

	}

	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() {

// Path: src/java/cd4017be/kineng/tileentity/IKineticLink.java
// public interface IKineticLink extends IShaftPart {
// 
// 	/** {@link #type()} bit-masks */
// 	public static final int T_TIER = 0xff, T_SHAPE = ~T_TIER;
// 	/** {@link #type()} standard shapes */
// 	public static final int
// 	T_ANGULAR = 0x000, T_BELT = 0x100, T_LINEAR = 0x200, T_MAGNETIC = 0x300,
// 	T_GRINDER = 0x400, T_SAWBLADE = 0x500;
// 
// 	/**@return the link type as a {@link #T_SHAPE} with a {@link #T_TIER}.
// 	 * Used to determine connection compatibility. */
// 	int type();
// 
// 	ForceCon getCon(EnumFacing side);
// 
// 	IForceProvider findLink(EnumFacing side);
// 
// 	@Override
// 	default double setShaft(ShaftAxis shaft, double v0) {
// 		v0 = IShaftPart.super.setShaft(shaft, v0);
// 		for(EnumFacing side : EnumFacing.values()) {
// 			ForceCon con = getCon(side);
// 			if(con == null) continue;
// 			con.setShaft(shaft);
// 			if (shaft == null)
// 				con.link(null);
// 		}
// 		return v0;
// 	}
// 
// 	@Override
// 	default void connect(boolean client) {
// 		if (invalid()) return;
// 		if (!client)
// 			for(EnumFacing side : VALUES)
// 				check(side);
// 		IShaftPart.super.connect(client);
// 	}
// 
// 	default void check(EnumFacing side) {
// 		ForceCon con = getCon(side);
// 		if(con == null) return;
// 		IForceProvider fp = findLink(side);
// 		con.link(fp == null ? null : fp.connect(this, side.getOpposite()));
// 	}
// 
// }
// 
// 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
import static cd4017be.kineng.tileentity.IKineticLink.*;
import java.util.*;
import java.util.function.*;
import cd4017be.api.recipes.RecipeAPI.IRecipeHandler;
import cd4017be.kineng.Main;
import cd4017be.lib.script.Parameters;
import cd4017be.lib.util.ItemKey;
import cd4017be.lib.util.OreDictStack;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.oredict.OreDictionary;

	}

	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;
