Applied-Energistics-2-tiler.../integration/modules/helpers/BCPerdition.java

60 lines
1.3 KiB
Java
Raw Normal View History

2014-01-30 19:54:32 +01:00
package appeng.integration.modules.helpers;
import net.minecraft.nbt.NBTTagCompound;
import buildcraft.api.power.IPowerReceptor;
import buildcraft.api.power.PowerHandler;
import buildcraft.api.power.PowerHandler.PowerReceiver;
import buildcraft.api.power.PowerHandler.Type;
public class BCPerdition extends BaseBCperdition
{
final protected PowerHandler bcPowerHandler;
public BCPerdition(IPowerReceptor te) {
bcPowerHandler = new PowerHandler( te, Type.MACHINE );
}
@Override
public void Tick()
{
bcPowerHandler.update();
}
@Override
public void writeToNBT(NBTTagCompound data)
{
bcPowerHandler.writeToNBT( data, "bcPowerHandler" );
}
@Override
public void readFromNBT(NBTTagCompound data)
{
bcPowerHandler.readFromNBT( data, "bcPowerHandler" );
}
@Override
public PowerReceiver getPowerReceiver()
{
return bcPowerHandler.getPowerReceiver();
}
@Override
public double useEnergy(float min, float max, boolean doUse)
{
return bcPowerHandler.useEnergy( min, max, doUse );
}
@Override
public void addEnergy(float failed)
{
bcPowerHandler.addEnergy( failed );
}
@Override
public void configure(int i, int j, float f, int k)
{
bcPowerHandler.configure( i, j, f, k );
}
2014-01-28 21:40:47 +01:00
}