diff --git a/common/buildcraft/transport/pipes/PipePowerWood.java b/common/buildcraft/transport/pipes/PipePowerWood.java index fd3eaa72..03c474c5 100644 --- a/common/buildcraft/transport/pipes/PipePowerWood.java +++ b/common/buildcraft/transport/pipes/PipePowerWood.java @@ -109,7 +109,7 @@ public class PipePowerWood extends Pipe implements IPowerRec return; } - int energyToRemove = requestedEnergy; + int energyToRemove = Math.min(battery.getEnergyStored(), requestedEnergy); // TODO: Have energyToRemove be precalculated // and used in receiveEnergy and extractEnergy. @@ -133,12 +133,8 @@ public class PipePowerWood extends Pipe implements IPowerRec } System.out.println("Sent " + energyToRemove + " energy to " + o.name()); - - int energyUsable = Math.min(battery.getEnergyStored(), energyToRemove); - - if (energyUsable > 0) { - battery.setEnergy(battery.getEnergyStored() - transport.receiveEnergy(o, energyUsable)); - } + + battery.setEnergy(battery.getEnergyStored() - transport.receiveEnergy(o, energyToRemove)); } }