2013-12-27 23:59:59 +01:00
|
|
|
package appeng.items.tools.powered.powersink;
|
|
|
|
|
2014-01-28 18:29:17 +01:00
|
|
|
/*
|
|
|
|
@Interface(iface = "universalelectricity.core.item.IItemElectric", modid = "IC2")
|
|
|
|
public class UniversalElectricity extends ThermalExpansion implements IItemElectric
|
|
|
|
{
|
|
|
|
*
|
|
|
|
* public UniversalElectricity(Class c, String subname) { super( c, subname ); }
|
|
|
|
*
|
|
|
|
* @Override public float recharge(ItemStack is, float energy, boolean
|
|
|
|
* doRecharge) { return (float) (energy - injectExternalPower( PowerUnits.KJ,
|
|
|
|
* is, energy, !doRecharge )); }
|
|
|
|
*
|
|
|
|
* @Override public float discharge(ItemStack is, float energy, boolean
|
|
|
|
* doDischarge) { return 0; }
|
|
|
|
*
|
|
|
|
* @Override public float getElectricityStored(ItemStack is) { return (int)
|
|
|
|
* PowerUnits.AE.convertTo( PowerUnits.KJ, getAECurrentPower( is ) ); }
|
|
|
|
*
|
|
|
|
* @Override public float getMaxElectricityStored(ItemStack is) { return (int)
|
|
|
|
* PowerUnits.AE.convertTo( PowerUnits.KJ, getAEMaxPower( is ) ); }
|
|
|
|
*
|
|
|
|
* @Override public void setElectricity(ItemStack is, float joules) { double
|
|
|
|
* currentPower = getAECurrentPower( is ); double targetPower =
|
|
|
|
* PowerUnits.KJ.convertTo( PowerUnits.AE, joules ); if ( targetPower >
|
|
|
|
* currentPower ) injectAEPower( is, targetPower - currentPower ); else
|
|
|
|
* extractAEPower( is, currentPower - targetPower ); }
|
|
|
|
*
|
|
|
|
* @Override public float getTransfer(ItemStack is) { return (float)
|
|
|
|
* PowerUnits.AE.convertTo( PowerUnits.KJ, getAEMaxPower( is ) -
|
|
|
|
* getAECurrentPower( is ) ); }
|
|
|
|
*
|
|
|
|
* @Override public float getVoltage(ItemStack itemStack) { return 120; }
|
|
|
|
|
|
|
|
}
|
|
|
|
*/
|
2013-12-27 23:59:59 +01:00
|
|
|
|