mirror of
https://github.com/artegoser/pimi-launcher-core.git
synced 2024-11-05 21:23:59 +03:00
Updated documentation.
This commit is contained in:
parent
f9fc29ee67
commit
c3c864df50
1 changed files with 44 additions and 9 deletions
53
README.md
53
README.md
|
@ -1,7 +1,8 @@
|
|||
# Minecraft Launcher Core
|
||||
### Currently only supports MC 1.7.3 and up.
|
||||
|
||||
A script that launches Minecraft using NodeJS.
|
||||
A script that launches Minecraft using NodeJS.
|
||||
Supports Vanilla and Forge.
|
||||
|
||||
### Installing
|
||||
|
||||
|
@ -12,15 +13,15 @@ A script that launches Minecraft using NodeJS.
|
|||
|
||||
##### launcher.core Options
|
||||
|
||||
| Parameter | Type | Description | Required |
|
||||
|------------------|----------|-------------------------------------------------------------------------------------------|----------|
|
||||
| Parameter | Type | Description | Required |
|
||||
|--------------------------|--------|-------------------------------------------------------------------------------------------|----------|
|
||||
| `options.authorization` | Object | The result from `getAuth` function, allows the client to login in online or offline mode. | True |
|
||||
| `options.clientPackage` | String | Path to the client package zip file. | False |
|
||||
| `options.root` | String | Path where you want the launcher to work in. like `C:/Users/user/AppData/Roaming/.mc` | True |
|
||||
| `options.os` | String | windows, osx or linux | True |
|
||||
| `options.version.number` | String | Minecraft version that is going to be launched. | True |
|
||||
| `options.version.type` | String | Any string. The actual Minecraft launcher uses `release` and `snapshot`. | True |
|
||||
| `options.memory.max` | String | Max amount of memory being used by Minectaft | True |
|
||||
| `options.clientPackage` | String | Path to the client package zip file. | False |
|
||||
| `options.root` | String | Path where you want the launcher to work in. like `C:/Users/user/AppData/Roaming/.mc` | True |
|
||||
| `options.os` | String | windows, osx or linux | True |
|
||||
| `options.version.number` | String | Minecraft version that is going to be launched. | True |
|
||||
| `options.version.type` | String | Any string. The actual Minecraft launcher uses `release` and `snapshot`. | True |
|
||||
| `options.memory.max` | String | Max amount of memory being used by Minectaft | True |
|
||||
|
||||
#### launcher.authenticator Functions
|
||||
|
||||
|
@ -45,6 +46,16 @@ A script that launches Minecraft using NodeJS.
|
|||
| `client_token` | String | Token being checked if it's the same client that the access_token was created from. | True |
|
||||
| `selected_profile` | Object | Json Object that was returned from Mojangs auth api. | True |
|
||||
|
||||
#### Events
|
||||
|
||||
| Event Name | Type | Description |
|
||||
|-------------------|---------|-------------------------------------------------------------------------------------|
|
||||
| `data` | Buffer | Emitted when information is returned from the Minecraft Process |
|
||||
| `close` | Integer | Code number that is returned by the Minecraft Process |
|
||||
| `error` | String | Emitted when the Minecraft Process errors |
|
||||
| `package-extract` | null | Emitted when `clientPackage` finishes being extracted |
|
||||
| `start` | null | Emitted after `launchOptions` are set. THIS WILL BE DEPRECATED AS ITS NOT ACCURATE |
|
||||
|
||||
#### Client Package Function
|
||||
|
||||
Client Packages allow the client to run offline on setup. This function should be used outside the actual launcher.
|
||||
|
@ -67,6 +78,7 @@ launcher.authenticator.getAuth("email", "password").then(auth => {
|
|||
launcher.core({
|
||||
authorization: auth,
|
||||
clientPackage: null,
|
||||
forge: null,
|
||||
root: "C:/Users/user/AppData/Roaming/.mc",
|
||||
os: "windows",
|
||||
version: {
|
||||
|
@ -104,6 +116,29 @@ launcher.core({
|
|||
});
|
||||
```
|
||||
|
||||
##### Using With Forge
|
||||
|
||||
```js
|
||||
launcher.authenticator.getAuth("email", "password").then(auth => {
|
||||
launcher.core({
|
||||
authorization: auth,
|
||||
clientPackage: null,
|
||||
root: "C:/Users/user/AppData/Roaming/.mc",
|
||||
forge: {
|
||||
path: "C:/Users/user/Desktop/forge.jar"
|
||||
},
|
||||
os: "windows",
|
||||
version: {
|
||||
number: "1.12.2", // needs to be the same as the Forge version
|
||||
type: "MCC-Launcher"
|
||||
},
|
||||
memory: {
|
||||
max: "500"
|
||||
}
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
#### What should it look like running from console?
|
||||
|
||||
|
|
Loading…
Reference in a new issue