From 60cb434da36ea88cd70d757c762805692f9b4120 Mon Sep 17 00:00:00 2001 From: Flow86 Date: Wed, 14 Aug 2013 10:29:20 +0200 Subject: [PATCH] fixes #1120 again though personally it would be better to make the hook return the value to adjust it by --- common/buildcraft/transport/IPipeTransportPowerHook.java | 2 +- common/buildcraft/transport/PipeTransportPower.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/buildcraft/transport/IPipeTransportPowerHook.java b/common/buildcraft/transport/IPipeTransportPowerHook.java index 26e6e88b..28cc3450 100644 --- a/common/buildcraft/transport/IPipeTransportPowerHook.java +++ b/common/buildcraft/transport/IPipeTransportPowerHook.java @@ -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); } diff --git a/common/buildcraft/transport/PipeTransportPower.java b/common/buildcraft/transport/PipeTransportPower.java index 2197d541..bf5e4ea8 100644 --- a/common/buildcraft/transport/PipeTransportPower.java +++ b/common/buildcraft/transport/PipeTransportPower.java @@ -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; }