Skip to content
🚧 This project and documentation is under construction and may be inaccurate. Packages and APIS may not be ready or available. 🚧

Client Controller

This controller allows for a game client to be installed or launched onto the target system. It replaces the launcher controller from earlier versions.

Parameters:

  • version: Game Version (e.g. 1.20.1)
  • loaderInfo: An object describing the loader. See here. (Defaults to { type: 'vanilla' })

This function gathers everything required for the selected version (using getCEObject) and then verifies / downloads the client jar, JVM, assets, libraries and logging config through the queue.

If the loader is not supported, an error is logged and the install falls back to vanilla.

Any patches that match the version and operating system are applied before installing.

The function will return the CE Object for the installation.

startGame (version, loaderInfo, authInfo, overrides)

Section titled “startGame (version, loaderInfo, authInfo, overrides)”

Parameters:

  • version: Game Version
  • loaderInfo: An object describing the loader. See here.
  • authInfo: Authentication Data for the logged-in user. See here.
  • overrides: JVM and Game argument overrides. See here. (Optional)

This function will:

  1. Install the game using installGame
  2. Create a session ID and inject it into the logging config
  3. Extract natives into .temp in the Cauldron folder
  4. Run any loader post processors (e.g. Forge / NeoForge)
  5. Build the launch script (see Launch Builder)
  6. Spawn the game as a detached process

The function finishes when the boot process starts. It will return the session ID.

If the version has no logging config, the session ID will be DETACH.

The .temp folder is removed automatically once the game closes.

Example, Launching a 1.7.10 vanilla client with no overrides

const { startGame } = require('@jackcooperdev/cauldronengine/client');
const sessionID = await startGame('1.7.10', { type: 'vanilla' }, authData);
// Returns SessionID

Example, Launching a 1.20.1 forge client with a specific loader version and overrides

const sessionID = await startGame('1.20.1', { type: 'forge', version: '47.3.0' }, authData, {
jvm: { launcher_name: 'CauldronMC', ram: '8' },
game: { game_directory: '/home/user/.cauldron/instances/my-pack' }
});
// Returns SessionID

Example, Installing a 1.21.1 neoforge client without launching

const { installGame } = require('@jackcooperdev/cauldronengine/client');
const ceObject = await installGame('1.21.1', { type: 'neoforge' });
// Returns CE Object
{
"type": "forge",
"version": "47.3.0"
}
  • type: One of vanilla, forge, fabric or neoforge
  • version: (Non-Vanilla Only) Exact loader version to use. Defaults to release (the recommended loader version)

For Information on how to retrieve this data, check out the Cauldron Authentication plugin.

authInfo can be supplied in one of three forms.

Account Object

{
"token": "MINECRAFT_ACCESS_TOKEN",
"accountData": {
"xuid": "2535400000000000",
"sub": "00000000-0000-0000-0000-000000000000",
"pfd": [
{
"id": "069a79f444e94726a5befca90e38aaf5",
"name": "Notch"
}
]
}
}

Access Token String

The Minecraft access token (JWT) as a string. The username, UUID, XUID and client ID are decoded from the token.

Demo

{ "demo": true }

Launches with a placeholder Demo user.

Overrides (or flag overrides) are changes made to how Minecraft boots. There are two types of override, game and jvm.

Example of an override object

{
"game": {
"version_type": "CauldronMC",
"game_directory": "C:\\Users\\User\\AppData\\Roaming\\.cauldron\\instances\\my-pack",
"server_ip": "play.example.com"
},
"jvm": {
"launcher_name": "CauldronMC",
"ram": "8",
"ram_low": "4"
}
}

jvm overrides:

Key Description Default
launcher_name Launcher name passed to Java CauldronEngine
ram Maximum RAM (GB) 8
ram_low Minimum RAM (GB) 4

game overrides:

Key Description
game_directory Directory the game runs in. Also used as the working directory
version_type Version type shown on the title screen
server_ip Joins this server on launch (--quickPlayMultiplayer / --server)
username Overrides the player name
uuid Overrides the player UUID

For A full list of arguments click here

Some versions are swapped to a different loader on certain systems so that they can run.

Patch Versions Operating System Change
ornithe_patch b1.7 to 1.2.5 mac-os-arm64 Loader is set to ornithe