Implement canConnectEnergy so RF cables don't connect when they shouldn't

This commit is contained in:
Ben Spiers committed 2014-08-06 02:51:25 +01:00
1 parent 12215490f0
commit a865a19340
1 file changed
+10 -1
@@ -288,7 +288,16 @@ public class PartUniversalCable extends PartTransmitter<EnergyNetwork> implement
@Method(modid = "CoFHAPI|energy")
public boolean canConnectEnergy(ForgeDirection from)
{
return true;
if(redstoneReactive && world().isBlockIndirectlyGettingPowered(x(), y(), z()))
{
return false;
}
testingSide = from;
boolean unblocked = tile().canReplacePart(this, this);
testingSide = null;
return unblocked;
}
@Override