LibraryDownloader class
Handles downloading of Minecraft library files.
Downloads and manages Java libraries required for Minecraft to run, including the client JAR file itself.
- Inheritance
-
- Object
- AbstractDownloader
- LibraryDownloader
Constructors
- LibraryDownloader.new({required String gameDir, DownloadProgressCallback? onDownloadProgress, OperationProgressCallback? onOperationProgress, int progressReportRate = 10})
- Creates a new library downloader.
Properties
-
completionFuture
→ Future<
void> -
Returns a future that completes when all libraries have been downloaded.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- onDownloadProgress → DownloadProgressCallback?
-
Callback for reporting download progress of individual files.
final
- onOperationProgress → OperationProgressCallback?
-
Callback for reporting progress of the overall libraries download operation.
final
- progressReportRate → int
-
Rate at which to report download progress.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
downloadClientJar(
VersionInfo versionInfo, String versionId) → Future< void> - Downloads the main Minecraft client JAR file.
-
downloadFile(
String url, String filePath, {int? expectedSize, String? resourceName}) → Future< File> -
Downloads a file from a URL to a specified path.
inherited
-
downloadLibraries(
VersionInfo versionInfo) → Future< void> - Downloads all libraries required for the specified Minecraft version.
-
ensureDirectory(
String path) → Future< Directory> -
Ensures a directory exists, creating it if necessary.
inherited
-
getAssetsDir(
) → String -
Gets the directory for storing game assets.
inherited
-
getClientJarPath(
String versionId) → String - Gets the path where the Minecraft client JAR file should be stored.
-
getGameDir(
) → String -
Gets the base game directory.
inherited
-
getLibrariesDir(
) → String -
Gets the directory for storing game libraries.
inherited
-
getVersionDir(
String versionId) → String - Gets the directory where version-specific files should be stored.
-
normalizePath(
String path) → String -
Normalizes a file path to an absolute path with correct separators.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reportOperationProgress(
String operationName, int completed, int total, double percentage) → void -
Reports progress of a batch operation.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited