diff --git a/common/buildcraft/transport/TileGenericPipe.java b/common/buildcraft/transport/TileGenericPipe.java index e0056da7..b2a68af3 100644 --- a/common/buildcraft/transport/TileGenericPipe.java +++ b/common/buildcraft/transport/TileGenericPipe.java @@ -407,7 +407,9 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, ITank @Override public int powerRequest() { - return getPowerProvider().getMaxEnergyReceived(); + if (BlockGenericPipe.isValid(pipe) && pipe instanceof IPowerReceptor) + return ((IPowerReceptor) pipe).powerRequest(); + return 0; } @Override diff --git a/common/buildcraft/transport/pipes/PipePowerWood.java b/common/buildcraft/transport/pipes/PipePowerWood.java index e152a07f..cb8a3d0f 100644 --- a/common/buildcraft/transport/pipes/PipePowerWood.java +++ b/common/buildcraft/transport/pipes/PipePowerWood.java @@ -114,9 +114,14 @@ public class PipePowerWood extends Pipe implements IPowerReceptor { energyToRemove = 1; } - float energyUsed = powerProvider.useEnergy(1, energyToRemove, true); + float energyUsable = powerProvider.useEnergy(1, energyToRemove, false); - trans.receiveEnergy(o.getOpposite(), energyUsed); + float energySend = Math.min(energyUsable, ((PipeTransportPower)transport).powerQuery[o.ordinal()]); + if(energySend > 0) + { + trans.receiveEnergy(o.getOpposite(), energySend); + powerProvider.useEnergy(1, energySend, true); + } } } }