Skip to content

Commit 54d9e7f

Browse files
committed
release 0.0.2
1 parent ed520ff commit 54d9e7f

File tree

3 files changed

+27
-53
lines changed

3 files changed

+27
-53
lines changed

CmlLib.Core.Installer.Forge/CmlLib.Core.Installer.Forge.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</PropertyGroup>
1010

1111
<PropertyGroup>
12-
<Version>0.0.1</Version>
12+
<Version>0.0.2</Version>
1313
<Description>Minecraft Forge Installer</Description>
1414
<Copyright>Copyright (c) 2023 CmlLib</Copyright>
1515
<PackageProjectUrl>https://github.com/CmlLib/CmlLib.Core.Installer.Forge</PackageProjectUrl>

README.md

Lines changed: 25 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,36 @@
11
# CmlLib.Core.Installer.Forge
2+
23
## Minecraft Forge Installer
34
<img src='https://raw.githubusercontent.com/CmlLib/CmlLib.Core/master/icon.png' width=128>
45

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+
68
## Features
79
* Forge Developer Support! After successfully installing the Forge version, the Forge advertising page will automatically open for you.
810
* 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.*)
1411
* Automatic installation of the Vanilla version of Minecraft before installing Forge
1512
* 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+
1618
## Install
1719

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.

SampleForgeInstaller/Program.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using CmlLib.Utils;
77
using SampleForgeInstaller;
88

9-
var httpClient = new HttpClient();
109
var path = new MinecraftPath(); // use default directory
1110
var launcher = new CMLauncher(path);
1211

@@ -37,7 +36,7 @@ void progressChanged(object? sender, ProgressChangedEventArgs e)
3736
//var version_name = await forge.Install(mcVersion); // install the recommended forge version for mcVersion
3837
//OR var version_name = forge.Install(mcVersion, forgeVersion).GetAwaiter().GetResult();
3938

40-
//Start MineCraft
39+
//Start Minecraft
4140
var launchOption = new MLaunchOption
4241
{
4342
MaximumRamMb = 1024,

0 commit comments

Comments
 (0)