This package is designed to work with MCLC to add Yggdrasil support.
# npm
npm i minecraft-launcher-core
# Yarn
yarn add minecraft-launcher-core
# pnpm
pnpm add minecraft-launcher-core
import Yggdrasil from '@mclc/yggdrasil';
import { Client } from 'minecraft-launcher-core';
import { v4 } from 'uuid';
const auth = new Yggdrasil('https://url.to/yggdrasil/authserver');
const authorization = await auth.authenticate({
username: 'john@example.com',
password: 'password',
clientToken: v4(),
});
const client = new Client({
// These arguments are only for the authentication
authorization,
customArgs: ['-javaagent:/path/to/authlib-injector.jar=https://url.to/yggdrasil'],
});
client.launch();