Possible fix for EnergyNet weirdness.

This commit is contained in:
Ben Spiers 2015-04-11 14:27:21 +01:00
parent 420e1619e6
commit 17e1cea25a

View file

@ -382,6 +382,13 @@ public class PartUniversalCable extends PartTransmitter<EnergyAcceptorWrapper, E
@Override
public EnergyAcceptorWrapper getCachedAcceptor(ForgeDirection side)
{
return EnergyAcceptorWrapper.get(cachedAcceptors[side.ordinal()]);
ConnectionType type = connectionTypes[side.ordinal()];
if(type == ConnectionType.PULL || type == ConnectionType.NONE)
{
return null;
}
return connectionMapContainsSide(currentAcceptorConnections, side) ? EnergyAcceptorWrapper.get(cachedAcceptors[side.ordinal()]) : null;
}
}