Applied-Energistics-2-tiler.../integration/modules/helpers/MJPerdition.java
AlgorithmX2 dc095749b7 Fixed Issue with DSU API,
Re-added support for MJ
Re-added support for pipe
Re-added support for BC-Facades.
2014-02-16 12:41:45 -06:00

61 lines
No EOL
1.3 KiB
Java

package appeng.integration.modules.helpers;
import net.minecraft.nbt.NBTTagCompound;
import appeng.integration.abstraction.helpers.BaseMJperdition;
import buildcraft.api.power.IPowerReceptor;
import buildcraft.api.power.PowerHandler;
import buildcraft.api.power.PowerHandler.PowerReceiver;
import buildcraft.api.power.PowerHandler.Type;
public class MJPerdition extends BaseMJperdition
{
final protected PowerHandler bcPowerHandler;
public MJPerdition(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 );
}
}