Merge branch '6.0.x' into 6.1.x
This commit is contained in:
commit
e5e8e4da4b
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue