fix wooden kinesis pipes not taking energy from certain RF generators unless they already had energy in them
This commit is contained in:
parent
0db1a4cbe3
commit
249caf7e21
1 changed files with 12 additions and 10 deletions
|
@ -103,7 +103,7 @@ public class PipePowerWood extends Pipe<PipeTransportPower> implements IPowerRec
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (battery.getEnergyStored() == 0 || sources == 0) {
|
if (sources == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,15 +141,17 @@ public class PipePowerWood extends Pipe<PipeTransportPower> implements IPowerRec
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (ForgeDirection o : ForgeDirection.VALID_DIRECTIONS) {
|
if (battery.getEnergyStored() > 0) {
|
||||||
if (!powerSources[o.ordinal()]) {
|
for (ForgeDirection o : ForgeDirection.VALID_DIRECTIONS) {
|
||||||
continue;
|
if (!powerSources[o.ordinal()]) {
|
||||||
}
|
continue;
|
||||||
|
}
|
||||||
int energyUsable = Math.min(battery.getEnergyStored(), energyToRemove);
|
|
||||||
|
int energyUsable = Math.min(battery.getEnergyStored(), energyToRemove);
|
||||||
if (energyUsable > 0) {
|
|
||||||
battery.setEnergy(battery.getEnergyStored() - transport.receiveEnergy(o, energyUsable));
|
if (energyUsable > 0) {
|
||||||
|
battery.setEnergy(battery.getEnergyStored() - transport.receiveEnergy(o, energyUsable));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue