return checkPipesConnections(from, to, way, false);
}
public static boolean checkPipesConnections(TileEntity from, TileEntity to, ForgeDirection way, boolean ignoreSystemDisconnection) {
if(from == null || to == null) return false;
IPipeInformationProvider fromInfo = SimpleServiceLocator.pipeInformaitonManager.getInformationProviderFor(from);
IPipeInformationProvider toInfo = SimpleServiceLocator.pipeInformaitonManager.getInformationProviderFor(to);
if(fromInfo == null && toInfo == null) return false;
if(fromInfo != null) {
if(!fromInfo.canConnect(to, way, ignoreSystemDisconnection)) return false;
}
if(toInfo != null) {
if(!toInfo.canConnect(from, way.getOpposite(), ignoreSystemDisconnection)) return false;
}
return true;
}