-
Notifications
You must be signed in to change notification settings - Fork 42
FileChecker
Check file existence and SHA1 hash to check if file is valid or invalid, and return invalid file list. Downloader
will download these files.
All file checker should inherit IFileChecker
. There are 5 default file checkers, AssetChecker
, ClientChecker
, LibraryChecker
, LogChecker
, and JavaChecker
.
var launcher = new CMLauncher(new MinecraftPath());
// Skip asset file checking
launcher.GameFileCheckers.AssetFileChecker = null;
// Skip hash checking of library files
launcher.GameFileCheckers.LibraryFileChecker.CheckHash = false;
// Use BMCLAPI mirror server
launcher.GameFileCheckers.LibraryFileChecker.LibraryServer = "https://bmclapi2.bangbang93.com/maven";
launcher.GameFileCheckers.AssetFileChecker.AssetServer = "https://bmclapi2.bangbang93.com/assets";
// Add custom file checker
launcher.GameFileCheckers.Add(new MyFileChecker());
Check game files and return invalid file list.
Check game files and return invalid file list.
Check asset files.
Type: string
Asset server to download files.
Default value: http://resources.download.minecraft.net/
Type: bool
Check SHA1 hash of file.
Default value: true
Check library files.
Type: string
Default library server to download files.
Default value: https://libraries.minecraft.net/
Type: bool
Check SHA1 hash of file.
Default value: true
Check client jar files.
Type: bool
Check SHA1 hash of file.
Default value: true
Check log configuration files.
Type: bool
Check SHA1 hash of file.
Default value: true
Check java runtime files. It checks MLaunchOption.JavaPath
, MLaunchOption.JavaVersion
, MVersion.JavaBinaryPath
, MVersion.JavaVersion
in that order to decides which java to use.
Type: bool
Check SHA1 hash of file.
Default value: true
Make derived class of IFileChecker
.
Represents IFileChecker list to be executed.
It contains 4 default FileChecker, AssetChecker
, ClientChecker
, LibraryChecker
, JavaChecker
You can add your FileChecker or remove default FileChecker.
Type: AssetChecker
Get default AssetChecker
Type: ClientChecker
Get default ClientChecker
Type: LibraryChecker
Get default LibraryChecker
Type: LogChecker
Get default LogChecker
Type: JavaChecker
Get default JavaChecker.
Add IFileChecker to collection
Remove IFileChecker in current collection
Remove IFileChecker using specific index number.
Add IFileChecker at specific position.