9a64980443
FMP Fixes Optional Interfaces for BC Optional Interfaces for IC2 Removed UE Api on Items Proxied Effect for C-CQuartz
40 lines
1.1 KiB
Java
40 lines
1.1 KiB
Java
package appeng.items.tools.powered.powersink;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
import appeng.api.config.PowerUnits;
|
|
import cofh.api.energy.IEnergyContainerItem;
|
|
import cpw.mods.fml.common.Optional.Interface;
|
|
|
|
@Interface(iface = "cofh.api.energy.IEnergyContainerItem", modid = "ThermalExpansion")
|
|
public class ThermalExpansion extends IC2 implements IEnergyContainerItem
|
|
{
|
|
|
|
public ThermalExpansion(Class c, String subname) {
|
|
super( c, subname );
|
|
}
|
|
|
|
@Override
|
|
public int receiveEnergy(ItemStack is, int maxReceive, boolean simulate)
|
|
{
|
|
return maxReceive - (int) injectExternalPower( PowerUnits.RF, is, maxReceive, simulate );
|
|
}
|
|
|
|
@Override
|
|
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
@Override
|
|
public int getEnergyStored(ItemStack is)
|
|
{
|
|
return (int) PowerUnits.AE.convertTo( PowerUnits.RF, getAECurrentPower( is ) );
|
|
}
|
|
|
|
@Override
|
|
public int getMaxEnergyStored(ItemStack is)
|
|
{
|
|
return (int) PowerUnits.AE.convertTo( PowerUnits.EU, getMaxEnergyStored( is ) );
|
|
}
|
|
|
|
}
|