-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd0f11d
commit 2140cc8
Showing
6 changed files
with
30 additions
and
45 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,14 @@ | ||
using MinecraftLaunch; | ||
// | ||
using MinecraftLaunch.Components.Authenticator; | ||
using MinecraftLaunch.Components.Fetcher; | ||
using MinecraftLaunch.Components.Installer; | ||
using MinecraftLaunch.Components.Launcher; | ||
using MinecraftLaunch.Components.Resolver; | ||
using MinecraftLaunch.Extensions; | ||
|
||
string gameFolder = "C:\\Users\\w\\Desktop\\temp\\.minecraft"; | ||
foreach (var item in new GameResolver(gameFolder).GetGameEntitys().ToList()) | ||
{ | ||
Console.WriteLine(item.JavaVersion); | ||
}; | ||
var installer = new VanlliaInstaller(new GameResolver(gameFolder), "1.16.5", MirrorDownloadManager.Mcbbs); | ||
return; | ||
installer.ProgressChanged += (_, x) => { | ||
Console.Clear(); | ||
Console.SetCursorPosition(0, 0); | ||
Console.WriteLine($"{x.Status} - {x.ProgressStatus} - {x.Progress.ToPercentage(0.0d, 0.65d) * 100:F2}%"); | ||
Console.SetCursorPosition(0, 0); | ||
}; | ||
|
||
var result = await installer.InstallAsync(); | ||
|
||
var fInstaller = new ForgeInstaller(new GameResolver(gameFolder).GetGameEntity("1.16.5"), | ||
(await ForgeInstaller.EnumerableFromVersionAsync("1.16.5")).FirstOrDefault(),new JavaFetcher().Fetch().First().JavaPath); | ||
|
||
fInstaller.ProgressChanged += (_, x) => { | ||
Console.Clear(); | ||
Console.SetCursorPosition(0, 0); | ||
Console.WriteLine($"{x.Status} - {x.ProgressStatus} - {x.Progress.ToPercentage(0.65d, 1.0d) * 100:F2}%"); | ||
Console.SetCursorPosition(0, 0); | ||
}; | ||
|
||
await fInstaller.InstallAsync(); | ||
|
||
Console.ReadKey(); | ||
var resolver = new GameResolver("C:\\Users\\w\\Desktop\\temp\\.minecraft"); | ||
Launcher launcher = new(resolver, new(new OfflineAuthenticator("Yang114").Authenticate()) { | ||
JvmConfig = new(new JavaFetcher().Fetch().FirstOrDefault().JavaPath) { | ||
MaxMemory = 1024, | ||
} | ||
}); | ||
|
||
await launcher.LaunchAsync("1.12.2"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using MinecraftLaunch.Classes.Interfaces; | ||
using MinecraftLaunch.Classes.Models.Game; | ||
|
||
namespace MinecraftLaunch.Components.Checker { | ||
public class PreLaunchChecker(GameEntry entry) : IChecker { | ||
public bool IsCheckResource { get; set; } | ||
|
||
public bool IsCheckAccount { get; set; } | ||
|
||
public ValueTask<bool> CheckAsync() { | ||
/* | ||
* | ||
*/ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters