|
1 | 1 | # CmlLib.Core.Installer.Forge
|
| 2 | + |
2 | 3 | ## Minecraft Forge Installer
|
3 | 4 | <img src='https://raw.githubusercontent.com/CmlLib/CmlLib.Core/master/icon.png' width=128>
|
4 | 5 |
|
5 |
| -This is the official package for installing Forge for the CmlLib.Core library. |
| 6 | +Forge Installer for [CmlLib.Core](https://github.com/CmlLib/CmlLib.Core) |
| 7 | + |
6 | 8 | ## Features
|
7 | 9 | * Forge Developer Support! After successfully installing the Forge version, the Forge advertising page will automatically open for you.
|
8 | 10 | * Automatic change of links to install Forge
|
9 |
| -* Installing Forge 1.7.10 |
10 |
| -* Installing a legacy version of the type (1.8-1.9.4) |
11 |
| -* Installing the old type version (1.10-1.11.2) |
12 |
| -* Installing a new type of version (1.12 - 1.16.5) |
13 |
| -* Installing the newest version of the type (1.16.5 - 1.20.*) |
14 | 11 | * Automatic installation of the Vanilla version of Minecraft before installing Forge
|
15 | 12 | * Skipping the Forge re-installation
|
| 13 | + |
| 14 | +## Supported Forge Versions |
| 15 | + |
| 16 | +**1.7.10 ~ 1.20.1** forge versions was successfully tested. [All test results](https://alphabs.gitbook.io/cmllib/installer.forge/supported-versions) |
| 17 | + |
16 | 18 | ## Install
|
17 | 19 |
|
18 |
| -Install the [CmlLib.Core Nuget package](https://www.nuget.org/packages/CmlLib.Core) |
19 |
| - |
20 |
| -or download the DLL files in [Releases](https://github.com/AlphaBs/CmlLib.Core/releases) and add references to them in your project. |
21 |
| - |
22 |
| -Write this at the top of your source code: |
23 |
| -```csharp |
24 |
| -using CmlLib.Core.Installer.Forge; |
25 |
| -using CmlLib.Core; |
26 |
| -using CmlLib.Core.Auth; |
27 |
| -``` |
28 |
| -## Quick start |
29 |
| -```csharp |
30 |
| -//var path = new MinecraftPath("game_directory_path"); |
31 |
| -var path = new MinecraftPath(); // use default directory |
32 |
| -
|
33 |
| -var launcher = new CMLauncher(path); |
34 |
| - |
35 |
| -// show launch progress to console |
36 |
| -launcher.FileChanged += (e) => Console.WriteLine($"[{e.FileKind.ToString()}] {e.FileName} - {e.ProgressedFileCount}/{e.TotalFileCount}"); |
37 |
| -launcher.ProgressChanged += (s, e) => Console.WriteLine($"{e.ProgressPercentage}%"); |
38 |
| - |
39 |
| -//Initialize variables with the Minecraft version and the Forge version |
40 |
| -var mcVersion = "1.12.2"; |
41 |
| -var forgeVersion = "14.23.5.2860"; |
42 |
| - |
43 |
| -//Initialize MForge |
44 |
| -var forge = new MForge(path, launcher); |
45 |
| -var version_name = await forge.Install(mcVersion, forgeVersion); //Use await in the asynchronous method |
46 |
| -//OR var version_name = forge.Install(mcVersion, forgeVersion).GetAwaiter().GetResult(); |
47 |
| -
|
48 |
| -//Start MineCraft |
49 |
| -var launchOption = new MLaunchOption |
50 |
| -{ |
51 |
| - MaximumRamMb = 1024, |
52 |
| - Session = MSession.GetOfflineSession("USERNAME"), |
53 |
| -}; |
54 |
| - |
55 |
| -var process = launcher.CreateProcess(version_name, launchOption); |
56 |
| -process.Start(); |
57 |
| -``` |
58 |
| -You can disable the quick launch feature if the version is already installed: |
59 |
| -```csharp |
60 |
| -var forge = new MForge(path, launcher, true); |
61 |
| -``` |
| 20 | +Install the [CmlLib.Core.Installer.Forge Nuget package](https://www.nuget.org/packages/CmlLib.Core.Installer.Forge) |
| 21 | + |
| 22 | +or download the nupkg in [Releases](https://github.com/CmlLib/CmlLib.Core.Installer.Forge/releases) and add references to them in your project. |
| 23 | + |
| 24 | +## [Documentation](https://alphabs.gitbook.io/cmllib/installer.forge/home) |
| 25 | + |
| 26 | +[Usages and Examples](https://alphabs.gitbook.io/cmllib/installer.forge/home) |
| 27 | + |
| 28 | +## Contributors |
| 29 | + |
| 30 | +<a href="https://github.com/CmlLib/CmlLib.Core.Installer.Forge/graphs/contributors"> |
| 31 | + <img src="https://contrib.rocks/image?repo=CmlLib/CmlLib.Core.Installer.Forge" /> |
| 32 | +</a> |
| 33 | + |
| 34 | +Made with [contrib.rocks](https://contrib.rocks). |
| 35 | + |
| 36 | +Special thanks to [TaigoStudio](https://github.com/TaigoStudio) for contributing almost entire source codes. |
0 commit comments