Fixed flat wire on face not receiving energy

This commit is contained in:
Calclavia 2014-02-06 01:05:28 +08:00
parent 0e7e770350
commit 9d959cb779
2 changed files with 8 additions and 3 deletions

View file

@ -78,7 +78,7 @@ public class TileBattery extends TileElectrical implements IConnector<BatteryNet
} }
} }
energy.setMaxTransfer(DEFAULT_WATTAGE * this.getNetwork().getConnectors().size()); energy.setMaxTransfer((long) Math.min(Math.pow(1000, this.getNetwork().getConnectors().size()), energy.getEnergyCapacity()));
markDistributionUpdate = true; markDistributionUpdate = true;
markClientUpdate = true; markClientUpdate = true;
} }

View file

@ -101,9 +101,14 @@ public class TraitConductor extends TileMultipart implements IConductor
/** /**
* Try out different sides to try to inject energy into. * Try out different sides to try to inject energy into.
*/ */
if (this.partMap(from.ordinal()) == null) if (partMap(from.ordinal()) instanceof IConductor)
{ {
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) return ((IConductor) partMap(from.ordinal())).onReceiveEnergy(from, receive, doReceive);
}
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
{
if (dir != from.getOpposite())
{ {
TMultiPart part = this.partMap(dir.ordinal()); TMultiPart part = this.partMap(dir.ordinal());