diff --git a/common/buildcraft/api/power/IPowerReceptor.java b/common/buildcraft/api/power/IPowerReceptor.java index 8fe6c83b..535f5049 100644 --- a/common/buildcraft/api/power/IPowerReceptor.java +++ b/common/buildcraft/api/power/IPowerReceptor.java @@ -9,6 +9,8 @@ package buildcraft.api.power; +import net.minecraftforge.common.ForgeDirection; + public interface IPowerReceptor { public void setPowerProvider(IPowerProvider provider); @@ -17,6 +19,6 @@ public interface IPowerReceptor { public void doWork(); - public int powerRequest(); + public int powerRequest(ForgeDirection validDirections); } diff --git a/common/buildcraft/builders/TileBuilder.java b/common/buildcraft/builders/TileBuilder.java index e193b149..032cb771 100644 --- a/common/buildcraft/builders/TileBuilder.java +++ b/common/buildcraft/builders/TileBuilder.java @@ -561,7 +561,7 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP } @Override - public int powerRequest() { + public int powerRequest(ForgeDirection from) { if ((bluePrintBuilder != null || currentPathIterator != null) && !done) return powerProvider.getMaxEnergyReceived(); else diff --git a/common/buildcraft/builders/TileFiller.java b/common/buildcraft/builders/TileFiller.java index bbbdaeef..3ffb4000 100644 --- a/common/buildcraft/builders/TileFiller.java +++ b/common/buildcraft/builders/TileFiller.java @@ -356,7 +356,7 @@ public class TileFiller extends TileBuildCraft implements ISidedInventory, IPowe } @Override - public int powerRequest() { + public int powerRequest(ForgeDirection from) { if (isActive()) return powerProvider.getMaxEnergyReceived(); else diff --git a/common/buildcraft/energy/TileEngine.java b/common/buildcraft/energy/TileEngine.java index d1a565ca..d85fa1b6 100644 --- a/common/buildcraft/energy/TileEngine.java +++ b/common/buildcraft/energy/TileEngine.java @@ -389,7 +389,7 @@ public class TileEngine extends TileBuildCraft implements IPowerReceptor, IInven } @Override - public int powerRequest() { + public int powerRequest(ForgeDirection from) { return 0; } diff --git a/common/buildcraft/factory/TileMachine.java b/common/buildcraft/factory/TileMachine.java index 92fb99c3..1a7d57b4 100644 --- a/common/buildcraft/factory/TileMachine.java +++ b/common/buildcraft/factory/TileMachine.java @@ -9,6 +9,7 @@ package buildcraft.factory; +import net.minecraftforge.common.ForgeDirection; import buildcraft.api.power.IPowerReceptor; import buildcraft.core.IMachine; import buildcraft.core.TileBuildCraft; @@ -16,7 +17,7 @@ import buildcraft.core.TileBuildCraft; public abstract class TileMachine extends TileBuildCraft implements IMachine, IPowerReceptor { @Override - public int powerRequest() { + public int powerRequest(ForgeDirection from) { if (isActive()) return (int) Math.ceil(Math.min(getPowerProvider().getMaxEnergyReceived(), getPowerProvider().getMaxEnergyStored() - getPowerProvider().getEnergyStored())); diff --git a/common/buildcraft/silicon/TileLaser.java b/common/buildcraft/silicon/TileLaser.java index daa4abda..d46e8036 100644 --- a/common/buildcraft/silicon/TileLaser.java +++ b/common/buildcraft/silicon/TileLaser.java @@ -235,7 +235,7 @@ public class TileLaser extends TileBuildCraft implements IPowerReceptor { } @Override - public int powerRequest() { + public int powerRequest(ForgeDirection from) { if (powerProvider.getEnergyStored() < 200 || laser != null) return 25; else diff --git a/common/buildcraft/transport/PipeTransportPower.java b/common/buildcraft/transport/PipeTransportPower.java index 3ceb7389..3c3e2a0e 100644 --- a/common/buildcraft/transport/PipeTransportPower.java +++ b/common/buildcraft/transport/PipeTransportPower.java @@ -161,7 +161,7 @@ public class PipeTransportPower extends PipeTransport { for (int i = 0; i < 6; ++i) { if (tiles[i] instanceof IPowerReceptor && !(tiles[i] instanceof TileGenericPipe)) { IPowerReceptor receptor = (IPowerReceptor) tiles[i]; - int request = receptor.powerRequest(); + int request = receptor.powerRequest(ForgeDirection.VALID_DIRECTIONS[i]); if (request > 0) { requestEnergy(ForgeDirection.VALID_DIRECTIONS[i], request); diff --git a/common/buildcraft/transport/TileGenericPipe.java b/common/buildcraft/transport/TileGenericPipe.java index e0056da7..627b9e18 100644 --- a/common/buildcraft/transport/TileGenericPipe.java +++ b/common/buildcraft/transport/TileGenericPipe.java @@ -406,7 +406,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, ITank } @Override - public int powerRequest() { + public int powerRequest(ForgeDirection from) { return getPowerProvider().getMaxEnergyReceived(); } diff --git a/common/buildcraft/transport/pipes/PipeItemsObsidian.java b/common/buildcraft/transport/pipes/PipeItemsObsidian.java index d8e070db..fa2f20bc 100644 --- a/common/buildcraft/transport/pipes/PipeItemsObsidian.java +++ b/common/buildcraft/transport/pipes/PipeItemsObsidian.java @@ -295,7 +295,7 @@ public class PipeItemsObsidian extends Pipe implements IPowerReceptor { } @Override - public int powerRequest() { + public int powerRequest(ForgeDirection from) { return getPowerProvider().getMaxEnergyReceived(); } } diff --git a/common/buildcraft/transport/pipes/PipeItemsWood.java b/common/buildcraft/transport/pipes/PipeItemsWood.java index 777dae89..99139704 100644 --- a/common/buildcraft/transport/pipes/PipeItemsWood.java +++ b/common/buildcraft/transport/pipes/PipeItemsWood.java @@ -229,7 +229,7 @@ public class PipeItemsWood extends Pipe implements IPowerReceptor { } @Override - public int powerRequest() { + public int powerRequest(ForgeDirection from) { return getPowerProvider().getMaxEnergyReceived(); } diff --git a/common/buildcraft/transport/pipes/PipeLiquidsWood.java b/common/buildcraft/transport/pipes/PipeLiquidsWood.java index 6acaea61..c670f551 100644 --- a/common/buildcraft/transport/pipes/PipeLiquidsWood.java +++ b/common/buildcraft/transport/pipes/PipeLiquidsWood.java @@ -145,7 +145,7 @@ public class PipeLiquidsWood extends Pipe implements IPowerReceptor { } @Override - public int powerRequest() { + public int powerRequest(ForgeDirection from) { return getPowerProvider().getMaxEnergyReceived(); } diff --git a/common/buildcraft/transport/pipes/PipePowerWood.java b/common/buildcraft/transport/pipes/PipePowerWood.java index e152a07f..db80df8d 100644 --- a/common/buildcraft/transport/pipes/PipePowerWood.java +++ b/common/buildcraft/transport/pipes/PipePowerWood.java @@ -123,7 +123,7 @@ public class PipePowerWood extends Pipe implements IPowerReceptor { } @Override - public int powerRequest() { + public int powerRequest(ForgeDirection from) { return getPowerProvider().getMaxEnergyReceived(); }