Missing Files.

This commit is contained in:
AlgorithmX2 2014-01-28 14:40:47 -06:00
parent d65cd0d82d
commit e7cda2b8e0
2 changed files with 84 additions and 0 deletions

View file

@ -0,0 +1,60 @@
package appeng.tile.powersink;
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 );
}
}

View file

@ -0,0 +1,24 @@
package appeng.tile.powersink;
import appeng.tile.events.AETileEventHandler;
import appeng.tile.events.TileEventType;
import buildcraft.api.power.PowerHandler.PowerReceiver;
import cpw.mods.fml.common.Optional.Method;
public abstract class BaseBCperdition extends AETileEventHandler
{
public BaseBCperdition() {
super( TileEventType.TICK, TileEventType.WORLD_NBT );
}
@Method(modid = "BuildCraftAPI|power")
public abstract PowerReceiver getPowerReceiver();
public abstract double useEnergy(float f, float requred, boolean b);
public abstract void addEnergy(float failed);
public abstract void configure(int i, int j, float f, int k);
}