mirror of
https://github.com/artegoser/pimi-launcher-core.git
synced 2024-11-22 12:16:21 +03:00
Updated documentation.
This commit is contained in:
parent
f9fc29ee67
commit
c3c864df50
1 changed files with 44 additions and 9 deletions
37
README.md
37
README.md
|
@ -2,6 +2,7 @@
|
|||
### Currently only supports MC 1.7.3 and up.
|
||||
|
||||
A script that launches Minecraft using NodeJS.
|
||||
Supports Vanilla and Forge.
|
||||
|
||||
### Installing
|
||||
|
||||
|
@ -13,7 +14,7 @@ A script that launches Minecraft using NodeJS.
|
|||
##### launcher.core Options
|
||||
|
||||
| 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 |
|
||||
|
@ -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…
Add table
Reference in a new issue