// 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.lib.network.Sync.GUI;
import java.util.ArrayList;
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.block.AdvancedBlock.IRedstoneTile;
import cd4017be.lib.network.*;
import cd4017be.lib.tileentity.BaseTileEntity.ITickableServerOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

				if (!found)
					while(i < cons.size() && cons.get(i).host == part)
						i++;
			}
		}
		this.idx = i;
		this.dJ = dJ / sJ * 0.5;
	}

	@Override
	public double setShaft(ShaftAxis shaft) {
		idx = -1;
		return super.setShaft(shaft);
	}

	@Override
	public int redstoneLevel(EnumFacing side, boolean strong) {
		return strong ? 0 : lastRS;
	}

	@Override
	public boolean connectRedstone(EnumFacing side) {
		return true;
	}

	@Override
	public AdvancedContainer getContainer(EntityPlayer player, int id) {
		return new AdvancedContainer(this, StateSyncAdv.of(false, this), player);
	}


// 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/TorqueTransducer.java
import static cd4017be.lib.network.Sync.GUI;
import java.util.ArrayList;
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.block.AdvancedBlock.IRedstoneTile;
import cd4017be.lib.network.*;
import cd4017be.lib.tileentity.BaseTileEntity.ITickableServerOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

				if (!found)
					while(i < cons.size() && cons.get(i).host == part)
						i++;
			}
		}
		this.idx = i;
		this.dJ = dJ / sJ * 0.5;
	}

	@Override
	public double setShaft(ShaftAxis shaft) {
		idx = -1;
		return super.setShaft(shaft);
	}

	@Override
	public int redstoneLevel(EnumFacing side, boolean strong) {
		return strong ? 0 : lastRS;
	}

	@Override
	public boolean connectRedstone(EnumFacing side) {
		return true;
	}

	@Override
	public AdvancedContainer getContainer(EntityPlayer player, int id) {
		return new AdvancedContainer(this, StateSyncAdv.of(false, this), player);
	}


	private static final ResourceLocation GUI_TEX = new ResourceLocation(Main.ID, "textures/gui/debug.png");
