Merge branch '6.0.x' into 6.1.x

This commit is contained in:
SpaceToad 2014-05-25 17:54:28 +02:00
commit e5e8e4da4b

View file

@ -139,6 +139,9 @@ public class TileEnergyConverter extends TileBuildCraft implements IPowerRecepto
if (tile instanceof IPowerReceptor && mjStored > 0) { if (tile instanceof IPowerReceptor && mjStored > 0) {
IPowerReceptor receptor = (IPowerReceptor) tile; IPowerReceptor receptor = (IPowerReceptor) tile;
PowerHandler.PowerReceiver powerReceiver = receptor.getPowerReceiver(side.getOpposite()); PowerHandler.PowerReceiver powerReceiver = receptor.getPowerReceiver(side.getOpposite());
if (powerReceiver == null) {
continue;
}
double wantToUse = Math.min(mjStored, powerReceiver.getMaxEnergyReceived()); double wantToUse = Math.min(mjStored, powerReceiver.getMaxEnergyReceived());
if (wantToUse > powerReceiver.getMinEnergyReceived()) { if (wantToUse > powerReceiver.getMinEnergyReceived()) {
powerReceiver.receiveEnergy(PowerHandler.Type.MACHINE, wantToUse, side); powerReceiver.receiveEnergy(PowerHandler.Type.MACHINE, wantToUse, side);