npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

minecraft-launcher-js

v0.1.0

Published

Minecraft launcher wrapper for JavaScipt with modern Typings.

Downloads

7

Readme

Minecraft Launcher JS

Minecraft launcher wrapper for JavaScipt with modern Typings.

Example

import { MinecraftLauncher } from 'minecraft-launcher-js';

const launcher = new MinecraftLauncher({
    // 
    authentication: {
      name: 'Player',
    },
    memory: {
      max: 2048,
      min: 1024,
    },
    version: {
      number: '1.19.3',
      type: 'release',
    },
});

async function main() {
    // Prepare directories.
    launcher.prepare();

    // Download if any file is missing.
    await launcher.download();

    // Launch game.
    await launcher.start();
}

main();

Documentation

Launcher constructor parameters

| Parameter | Type | Description | Required | |----------------------------------|----------|--------------------------------------------------------------------|----------| | assetsRoot | String | Path that will be used to load or download the game assets. | False | | authentication.accessToken | String | Access token provided by an authentication flow. | False | | authentication.clientToken | String | Client token provided by an authentication flow. | False | | authentication.uuid | String | UUID of the authenticated user (for online-mode: true) | False | | authentication.name | String | Username of the authenticated userr | True | | authentication.meta.type | String | User type (can be mojang or msa) | False | | authentication.meta.xuid | String | User xuid | False | | authentication.meta.clientId | String | Application id | False | | brand.name | String | Custom launcher name, required if brand.version was specified. | False | | brand.version | String | Custom launcher version, required if brand.name was specified. | False | | env | Object | Env variables. By default the operating system will be used. | False | | features.is_demo_user | Boolean | Launch the game in demo mode. | False | | features.has_custom_resolution | Boolean | Launch the game using resolution from window settings (see below) | False | | fixLog4JExploit | Boolean | In versions less than 1.17 it will disable Log4j lookup functions. | False | | gameRoot | String | Path to be used to load game data (Default %appdata%.minecraft) | False | | jarFile | String | Jar file of the version (Default versions/{ver}/{ver}.jar) | False | | javaPath | String | Java binary path. By default it will try to get the system one. | False | | jsonFile | String | Json file of the version (Default versions/{ver}/{ver}.json) | False | | libraryRoot | String | Path that will be used to load or download the game libraries. | False | | memory.max | Number | Maximum ram memory of the instance. | True | | memory.min | Number | Minimum ram memory of the instance. | True | | nativesRoot | String | Path that will be used to load or download the game natives. | False | | os | String | Operating system. By default it will try to detect. | False | | version.number | String | Version to be launched, for example 1.19.3. | True | | version.type | String | Version type to be launched, value can be relase or snapshot. | True | | versionRoot | String | Path that will be used to load or download the game versions. | False | | window.height | Number | The height of the window if has_custom_resolution is activated. | False | | window.width | Number | The width of the window if has_custom_resolution is activated. | False | | urls.meta | String | URL from where the manifests will be obtained. | False | | urls.resources | String | URL from where the resources will be obtained. | False | | urls.libraries | String | URL from where the libraries will be obtained. | False |