From 1dc5a5bf5d756bdd88a5c456e1315ddf68cca6e2 Mon Sep 17 00:00:00 2001 From: asiekierka Date: Mon, 1 Dec 2014 12:54:34 +0100 Subject: [PATCH] fix #2257 --- .../buildcraft/transport/PipeTransportPower.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/common/buildcraft/transport/PipeTransportPower.java b/common/buildcraft/transport/PipeTransportPower.java index a826230f..54ce83aa 100644 --- a/common/buildcraft/transport/PipeTransportPower.java +++ b/common/buildcraft/transport/PipeTransportPower.java @@ -111,8 +111,18 @@ public class PipeTransportPower extends PipeTransport { } public boolean isPowerSource(TileEntity tile, ForgeDirection side) { + if (tile instanceof TileBuildCraft && !(tile instanceof IEngine)) { + // Disregard non-engine BC tiles. + // While this, of course, does nothing to work with other mods, + // it at least makes it work nicely with BC's built-in blocks while + // the new RF api isn't out. + return false; + } + + return (tile instanceof IEnergyConnection && ((IEnergyConnection) tile).canConnectEnergy(side.getOpposite())); + // TODO: Look into this code again when the new RF API is out. + /* if (tile instanceof IEnergyConnection && ((IEnergyConnection) tile).canConnectEnergy(side.getOpposite())) { - // TODO: Remove this hack! It's only done until Ender IO/MFR move to the new RF API if (tile instanceof TileBuildCraft && !(tile instanceof IEngine)) { // Disregard non-engine BC tiles return false; @@ -122,7 +132,7 @@ public class PipeTransportPower extends PipeTransport { } else { // Disregard tiles which can't connect either, I guess. return false; - } + }*/ } @Override