classinternalSource
public class LibraryDownloader

Constructors

public LibraryDownloader(int downloadThreads)
Parameters
downloadThreadsint

Methods

public void downloadLibraries(Loader loader, Path librariesDir)
Parameters
loaderLoader
librariesDirPath
public void downloadLibraries(
    Loader loader,
    Path librariesDir,
    Consumer<Double> progressConsumer,
    LaunchContext context
)
Downloads the libraries.
Parameters
loaderLoaderThe loader to use
librariesDirPathThe directory the libraries should be downloaded to
progressConsumerConsumer<Double>
contextLaunchContext
public void downloadLibraries(
    Loader loader,
    Path librariesDir,
    Path nativesDir,
    Consumer<Double> progressConsumer,
    LaunchContext context
)
Downloads the libraries and extracts native libraries
Parameters
loaderLoaderThe loader to use
librariesDirPathThe directory the libraries should be downloaded to
nativesDirPathThe directory native libraries should be extracted to, has to match the directory the game loads them from
progressConsumerConsumer<Double>
contextLaunchContext
Throws
LibraryDownloadExceptionIf a library could not be downloaded or extracted