// Path: src/java/cd4017be/kineng/physics/Ticking.java
// public static final double dt = 0.05;
// 
// 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.physics.Ticking.dt;
import static cd4017be.lib.network.Sync.GUI;
import cd4017be.kineng.Main;
import cd4017be.kineng.physics.*;
import cd4017be.lib.Gui.AdvancedContainer;
import cd4017be.lib.Gui.AdvancedContainer.IStateInteractionHandler;
import cd4017be.lib.Gui.ModularGui;
import cd4017be.lib.Gui.comp.*;
import cd4017be.lib.network.*;
import cd4017be.math.cplx.CplxD;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.*;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

			c0 = 0F; //target speed [m/s]
			c1 = 0F; //strength [N*s/m]
			con.link(new ConstSpeed());
			break;
		case A_FRICTION:
			if (con.force instanceof Friction) break;
			mode = a;
			c0 = 0F;    //friction force [N]
			c1 = 0.01F; //null velocity [m/s]
			con.link(new Friction());
			break;
		case A_C0:
			c0 = pkt.readFloat();
			break;
		case A_C1:
			c1 = pkt.readFloat();
			break;
		case A_RESET:
			Eacc = 0;
			break;
		}
	}

	private class ConstPower extends DynamicForce {

		/** [J] */
		public double E;

		@Override
		public void work(double dE, double ds, double v1) {

// Path: src/java/cd4017be/kineng/physics/Ticking.java
// public static final double dt = 0.05;
// 
// 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/tileentity/MechanicalDebug.java
import static cd4017be.kineng.physics.Ticking.dt;
import static cd4017be.lib.network.Sync.GUI;
import cd4017be.kineng.Main;
import cd4017be.kineng.physics.*;
import cd4017be.lib.Gui.AdvancedContainer;
import cd4017be.lib.Gui.AdvancedContainer.IStateInteractionHandler;
import cd4017be.lib.Gui.ModularGui;
import cd4017be.lib.Gui.comp.*;
import cd4017be.lib.network.*;
import cd4017be.math.cplx.CplxD;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.*;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

			c0 = 0F; //target speed [m/s]
			c1 = 0F; //strength [N*s/m]
			con.link(new ConstSpeed());
			break;
		case A_FRICTION:
			if (con.force instanceof Friction) break;
			mode = a;
			c0 = 0F;    //friction force [N]
			c1 = 0.01F; //null velocity [m/s]
			con.link(new Friction());
			break;
		case A_C0:
			c0 = pkt.readFloat();
			break;
		case A_C1:
			c1 = pkt.readFloat();
			break;
		case A_RESET:
			Eacc = 0;
			break;
		}
	}

	private class ConstPower extends DynamicForce {

		/** [J] */
		public double E;

		@Override
		public void work(double dE, double ds, double v1) {

			E += c0 * dt - dE;
