Skip to content

Commit

Permalink
Merge pull request #79 from Corona-Studio/laolarou726-patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
laolarou726 committed May 8, 2023
2 parents 20cbb56 + 3bc72fc commit 2765c78
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ All you need for minecraft launcher in typescript. https://voxelum.github.io/min
+ Due to the limitation of the default number of connections in .NET, you need to manually override the default number of connections to ensure that some methods in <DownloadHelper> are executed normally. You can add the following code in App.xaml.cs or the entry point of the program to complete the modification (The maximum value should not exceed 1024)

```c#

using System.Net;

ServicePointManager.DefaultConnectionLimit = 512;

```

## Installation
Expand All @@ -55,9 +53,7 @@ There are two methods for the first step:
* Directly install ProjBobcat via Nuget Package Manager or simply execute

```
Install-Package ProjBobcat
```
in Package Manager Console.

Expand Down Expand Up @@ -107,15 +103,12 @@ Selective components:
#### Java Detection

```csharp

var javaList = ProjBobcat.Class.Helper.SystemInfoHelper.FindJava(); // Returns a list of all java installations found in registry.
```

#### Core Initialization

```csharp

var core = new DefaultGameCore
{
ClientToken = clientToken,
Expand All @@ -127,15 +120,12 @@ var core = new DefaultGameCore
},
GameLogResolver = new DefaultGameLogResolver()
};

```

#### Game Scaning

```csharp

List<VersionInfo> gameList = core.VersionLocator.GetAllGames().ToList();

```

#### Resource Completion
Expand Down Expand Up @@ -163,7 +153,6 @@ var drc = new DefaultResourceCompleter
};

await drc.CheckAndDownloadTaskAsync().ConfigureAwait(false);

```

Here are some events which you could bind to your program.
Expand All @@ -177,7 +166,6 @@ Here are some events which you could bind to your program.
#### Launch Configuration

```csharp

var launchSettings = new LaunchSettings
{
FallBackGameArguments = new GameArguments // Default game arguments for all games in .minecraft/ as the fallback of specific game launch.
Expand Down Expand Up @@ -207,7 +195,6 @@ launchSettings.GameArguments = new GameArguments // (Optional) The arguments of
MinMemory = specificMinMemory, // Minimum Memory
MaxMemory = specificMaxMemory // Maximum Memory
};

```

Here are some events which you could bind to your program.
Expand All @@ -223,34 +210,28 @@ Here are some events which you could bind to your program.
Offline:

```csharp

launchSettings.Authenticator = new OfflineAuthenticator
{
Username = "Username"
LauncherAccountParser = core.VersionLocator.LauncherAccountParser // launcher_profiles.json parser
},

```

Online:

```csharp

launchSettings.Authenticator = new YggdrasilAuthenticator
{
LauncherAccountParser = core.VersionLocator.LauncherAccountParser
Email = "[email protected]", // Registered E-mail address on Mojang authentication server.
Password = "password"
};

```

#### Launch!

```csharp

var result = await Core.LaunchTaskAsync(launchSettings).ConfigureAwait(true); // Returns the launch result
```

## Stats
Expand Down

0 comments on commit 2765c78

Please sign in to comment.