<CovertJaguar> though personally it would be better to make the hook return the value to adjust it by
This commit is contained in:
Flow86 2013-08-14 10:29:20 +02:00
parent 91b2550956
commit 60cb434da3
2 changed files with 2 additions and 2 deletions

View file

@ -15,5 +15,5 @@ public interface IPipeTransportPowerHook {
public float receiveEnergy(ForgeDirection from, float val);
public void requestEnergy(ForgeDirection from, float amount);
public float requestEnergy(ForgeDirection from, float amount);
}

View file

@ -336,7 +336,7 @@ public class PipeTransportPower extends PipeTransport {
public void requestEnergy(ForgeDirection from, float amount) {
step();
if (this.container.pipe instanceof IPipeTransportPowerHook) {
((IPipeTransportPowerHook) this.container.pipe).requestEnergy(from, amount);
nextPowerQuery[from.ordinal()] += ((IPipeTransportPowerHook) this.container.pipe).requestEnergy(from, amount);
} else {
nextPowerQuery[from.ordinal()] += amount;
}