// Path: src/java/cd4017be/kineng/physics/Ticking.java
// public static final double dt = 0.05;
// 
// Path: src/java/cd4017be/kineng/block/BlockRotaryTool.java
// public class BlockRotaryTool extends BlockShaft {
// 
// 	public double maxF;
// 	public final int type;
// 	public ItemStack scrap = ItemStack.EMPTY;
// 
// 	/**
// 	 * @param id
// 	 * @param m
// 	 * @param r
// 	 * @param tile
// 	 */
// 	public BlockRotaryTool(String id, ShaftMaterial m, int type, double r, Class<? extends TileEntity> tile) {
// 		super(id, m, r, tile);
// 		this.type = type;
// 	}
// 
// 	@Override
// 	public double J(IBlockState state) {
// 		return J_dens;
// 	}
// 
// 	@Override
// 	public double getDebris(IBlockState state, List<ItemStack> items) {
// 		items.add(shaftMat.scrap);
// 		items.add(scrap);
// 		return r;
// 	}
// 
// 	public void setMaterials(ShaftMaterial mat, double r, double h) {
// 		J_dens = Formula.J_biCylinder(0.25, shaftMat.density, r, mat.density, h);
// 		av_max = Math.min(
// 			Formula.rip_vel(shaftMat.strength / shaftMat.density, 0.25),
// 			Formula.rip_vel(mat.strength / mat.density, r)
// 		);
// 	}
// 
// 	@Override
// 	@SideOnly(Side.CLIENT)
// 	protected void addInformation(IBlockState state, List<String> tooltip, ITooltipFlag advanced) {
// 		super.addInformation(state, tooltip, advanced);
// 		tooltip.add(TooltipUtil.format("info.kineng.toolstats", radius(state), maxF));
// 	}
// 
// }


import static cd4017be.kineng.physics.Ticking.dt;
import static java.lang.Math.*;
import static net.minecraftforge.fluids.FluidRegistry.WATER;
import cd4017be.kineng.block.BlockRotaryTool;
import cd4017be.kineng.physics.*;
import cd4017be.lib.block.AdvancedBlock.IInteractiveTile;
import cd4017be.math.cplx.CplxD;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.text.TextComponentString;
import net.minecraftforge.fluids.*;

		Wheel w = getForce();
		player.sendStatusMessage(new TextComponentString(
			String.format("%.0f mB/t @ %.1f m/s", w.p_m, sqrt(abs(w.p_Ekin / w.p_m)))
		), true);
		return true;
	}

	@Override
	public void onClicked(EntityPlayer player) {}

	static class Wheel extends DynamicForce {

		double Ekin, m;
		double p_Ekin, p_m, vsq;

		void add(double m, double vsq) {
			this.m += m;
			this.Ekin += vsq * m;
		}

		@Override
		public void work(double dE, double ds, double v) {
			vsq = v * v;
			p_Ekin = Ekin;
			p_m = m;
			Ekin = m = 0;
		}

		@Override
		public ForceCon getM(CplxD M, double av) {

// Path: src/java/cd4017be/kineng/physics/Ticking.java
// public static final double dt = 0.05;
// 
// Path: src/java/cd4017be/kineng/block/BlockRotaryTool.java
// public class BlockRotaryTool extends BlockShaft {
// 
// 	public double maxF;
// 	public final int type;
// 	public ItemStack scrap = ItemStack.EMPTY;
// 
// 	/**
// 	 * @param id
// 	 * @param m
// 	 * @param r
// 	 * @param tile
// 	 */
// 	public BlockRotaryTool(String id, ShaftMaterial m, int type, double r, Class<? extends TileEntity> tile) {
// 		super(id, m, r, tile);
// 		this.type = type;
// 	}
// 
// 	@Override
// 	public double J(IBlockState state) {
// 		return J_dens;
// 	}
// 
// 	@Override
// 	public double getDebris(IBlockState state, List<ItemStack> items) {
// 		items.add(shaftMat.scrap);
// 		items.add(scrap);
// 		return r;
// 	}
// 
// 	public void setMaterials(ShaftMaterial mat, double r, double h) {
// 		J_dens = Formula.J_biCylinder(0.25, shaftMat.density, r, mat.density, h);
// 		av_max = Math.min(
// 			Formula.rip_vel(shaftMat.strength / shaftMat.density, 0.25),
// 			Formula.rip_vel(mat.strength / mat.density, r)
// 		);
// 	}
// 
// 	@Override
// 	@SideOnly(Side.CLIENT)
// 	protected void addInformation(IBlockState state, List<String> tooltip, ITooltipFlag advanced) {
// 		super.addInformation(state, tooltip, advanced);
// 		tooltip.add(TooltipUtil.format("info.kineng.toolstats", radius(state), maxF));
// 	}
// 
// }


// Path: src/java/cd4017be/kineng/tileentity/WaterWheel.java
import static cd4017be.kineng.physics.Ticking.dt;
import static java.lang.Math.*;
import static net.minecraftforge.fluids.FluidRegistry.WATER;
import cd4017be.kineng.block.BlockRotaryTool;
import cd4017be.kineng.physics.*;
import cd4017be.lib.block.AdvancedBlock.IInteractiveTile;
import cd4017be.math.cplx.CplxD;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.text.TextComponentString;
import net.minecraftforge.fluids.*;

		Wheel w = getForce();
		player.sendStatusMessage(new TextComponentString(
			String.format("%.0f mB/t @ %.1f m/s", w.p_m, sqrt(abs(w.p_Ekin / w.p_m)))
		), true);
		return true;
	}

	@Override
	public void onClicked(EntityPlayer player) {}

	static class Wheel extends DynamicForce {

		double Ekin, m;
		double p_Ekin, p_m, vsq;

		void add(double m, double vsq) {
			this.m += m;
			this.Ekin += vsq * m;
		}

		@Override
		public void work(double dE, double ds, double v) {
			vsq = v * v;
			p_Ekin = Ekin;
			p_m = m;
			Ekin = m = 0;
		}

		@Override
		public ForceCon getM(CplxD M, double av) {

			Fdv = -0.5 * m / dt;
