Added basic BuildCraft support for wires

This commit is contained in:
Calclavia 2013-08-29 20:28:31 +08:00
parent cd936af1ec
commit dc3a6e7b87
2 changed files with 10 additions and 1 deletions

@ -1 +1 @@
Subproject commit fa2bad8bfcbc7fe855c5415d3a0cc85acca92b83
Subproject commit 04df3282ba2aa9eeea58d15050bf75a4ce996080

View file

@ -9,10 +9,12 @@ import net.minecraft.tileentity.TileEntityFurnace;
import net.minecraftforge.common.ForgeDirection;
import resonantinduction.PacketHandler;
import resonantinduction.base.IPacketReceiver;
import universalelectricity.compatibility.Compatibility;
import universalelectricity.compatibility.TileEntityUniversalConductor;
import universalelectricity.core.block.INetworkProvider;
import universalelectricity.core.vector.Vector3;
import universalelectricity.core.vector.VectorHelper;
import buildcraft.api.power.PowerHandler;
import com.google.common.io.ByteArrayDataInput;
@ -187,4 +189,11 @@ public class TileEntityWire extends TileEntityUniversalConductor implements IPac
return null;
}
@Override
public void doWork(PowerHandler workProvider)
{
this.buildcraftBuffer = Compatibility.BC3_RATIO * 25 * this.getMaterial().maxAmps;
this.powerHandler.configure(0, this.buildcraftBuffer, this.buildcraftBuffer, this.buildcraftBuffer * 2);
super.doWork(workProvider);
}
}