minecraft-launcher-core-node
minecraft-launcher-core-node copied to clipboard
Provide packages to install Minecraft, launch Minecraft and more to build launcher with NodeJs/Electron!
Minecraft Launcher Core
Provide several useful functions to build a Minecraft Launcher.
Most packages are targeting the Electron environment. Feel free to report issues related to it.
-
Minecraft Launcher Core
- Looking for C# Launcher Core?
- Featured Launcher
-
Installation & Usage
- Bundle & Treeshaking
- CommonJS
- Electron Version
- Getting Started
- Active Packages
- Contribute
- Credit
Looking for C# Launcher Core?
Introduce the awesome .net framework launcher core, ProjBobcat.
It's the next generation Minecraft launcher core written in C# providing the freest, fastest and the most complete experience. https://craftmine.fun
Featured Launcher
- x-minecraft-launcher: An launcher provides general electron api related to minecraft launching (in renderer side), making other developers can easily create new launcher view.
- PureLauncher: An awesome Minecraft Launcher using React to build beautiful UI.
Installation & Usage
This repo maintaining multiple mini packages for specific functions.
If you use electron to write a minimum launcher, you can install @xmcl/core
which only has such functions:
- Parse existed Minecraft version
- Launch the game
If you have bigger ambition on your launcher, you want it be able to download/install Minecraft, then you can have @xmcl/installer
, which contains the functions of:
- Get the version information of Minecraft/Forge/Liteloader/Fabric
- Install Minecraft/Forge/Liteloader/Fabric to the game folder
If you still not satisfied, as you want even provide the function to parse existed resource pack and mods under game folder, then you will have @xmcl/mod-parser
and @xmcl/resourcepack
modules, which contain such functions:
- Parse Forge/Liteloader/Fabric mods metadata
- Parse resource pack metadata
There are more packages for advantage usages, and you can check out the getting started section to navigate.
Bundle & Treeshaking
The module built with ES5
module option by typescript. To use treeshake, please make sure your bundle system support esm import/export.
Some bundler like webpack, rollup support treeshake by default. Just make sure you dont do something like import * as SomeNamespace from ...
, which will bundle the whole package.
(But import { xxx } from 'xxx'
will still work)
CommonJS
If you don't have a bundler to transform the package, you can still use it in cjs. The webpack will pick the "main"
field in package.json
which is pointing to the cjs version.
It means you don't need to do anything in extra ideally.
Electron Version
Recommend to use the latest electron, so you don't need to setup babel with webpack 4.
Getting Started
Please respect the typescript interface and jsdoc in type definition if the markdown document is outdated. Contact the developer if you find the document outdated or mismatched!
Go Getting Started page.
Or you can read the full document.
Active Packages
Contribute
See Contribute.md
Credit
lukechu10 helped me to generate the document from typescript.
HoldYourWaffle provided great suggestions to repo.
Yu Xuanchi provided some idea about NBT module.
Haowei Wen, the author of JMCCC, Authlib Injector, and Indexyz, helped me a lot on Minecraft launching, authing.