VanillaLauncher constructor

VanillaLauncher({
  1. required String gameDir,
  2. required String javaDir,
  3. required LauncherProfiles profiles,
  4. required Profile activeProfile,
  5. MinecraftAccountProfile? minecraftAccountProfile,
  6. MicrosoftAccount? microsoftAccount,
  7. MinecraftAuth? minecraftAuth,
  8. DownloadProgressCallback? onDownloadProgress,
  9. OperationProgressCallback? onOperationProgress,
  10. int progressReportRate = 10,
  11. String launcherName = 'CraftLauncher',
  12. String launcherVersion = '1.0.0',
})

Creates a new VanillaLauncher instance.

gameDir - Directory where the game files are stored javaDir - Directory where Java is installed profiles - Launcher profiles configuration activeProfile - Currently active profile minecraftAccountProfile - Optional Minecraft account profile information microsoftAccount - Optional Microsoft account for authentication minecraftAuth - Optional Minecraft authentication details onDownloadProgress - Optional callback for download progress reporting onOperationProgress - Optional callback for operation progress reporting progressReportRate - How often to report progress (in percentage points) launcherName - Name of the launcher launcherVersion - Version of the launcher

Implementation

VanillaLauncher({
  required String gameDir,
  required String javaDir,
  required LauncherProfiles profiles,
  required Profile activeProfile,
  MinecraftAccountProfile? minecraftAccountProfile,
  MicrosoftAccount? microsoftAccount,
  MinecraftAuth? minecraftAuth,
  DownloadProgressCallback? onDownloadProgress,
  OperationProgressCallback? onOperationProgress,
  int progressReportRate = 10,
  String launcherName = 'CraftLauncher',
  String launcherVersion = '1.0.0',
}) : _gameDir = gameDir,
     _javaDir = javaDir,
     _minecraftAccountProfile = minecraftAccountProfile,
     _microsoftAccount = microsoftAccount,
     _minecraftAuth = minecraftAuth,
     _onDownloadProgress = onDownloadProgress,
     _onOperationProgress = onOperationProgress,
     _progressReportRate = progressReportRate,
     _launcherName = launcherName,
     _launcherVersion = launcherVersion,
     _javaArgumentsBuilder = JavaArgumentsBuilder(
       launcherName: launcherName,
       launcherVersion: launcherVersion,
     ),
     _classpathManager = ClasspathManager(
       gameDir: gameDir,
       onDownloadProgress: onDownloadProgress,
       onOperationProgress: onOperationProgress,
       progressReportRate: progressReportRate,
     ),
     assetDownloader = AssetDownloader(
       gameDir: gameDir,
       onDownloadProgress: onDownloadProgress,
       onOperationProgress: onOperationProgress,
       progressReportRate: progressReportRate,
     ),
     _archivesManager = ArchivesManager(
       onOperationProgress: onOperationProgress,
       progressReportRate: progressReportRate,
     ),
     _profileManager = ProfileManager(
       gameDir: gameDir,
       profiles: profiles,
       activeProfile: activeProfile,
     );