ClasspathManager constructor

ClasspathManager({
  1. required String gameDir,
  2. DownloadProgressCallback? onDownloadProgress,
  3. OperationProgressCallback? onOperationProgress,
  4. int progressReportRate = 10,
})

Creates a new classpath manager.

gameDir The root directory for Minecraft game files.

onDownloadProgress Optional callback for reporting file download progress.

onOperationProgress Optional callback for reporting overall operation progress.

progressReportRate How often to report progress, defaults to every 10%.

Implementation

ClasspathManager({
  required String gameDir,
  DownloadProgressCallback? onDownloadProgress,
  OperationProgressCallback? onOperationProgress,
  int progressReportRate = 10,
}) : _gameDir = gameDir,
     _librariesDir = p.join(gameDir, 'libraries'),
     _onDownloadProgress = onDownloadProgress,
     _onOperationProgress = onOperationProgress,
     _progressReportRate = progressReportRate;