Provide several useful functions to build a Minecraft Launcher.
Most packages are targeting the Electron environment. Feel free to report issues related to it.
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
- 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.
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.
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)
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.
Recommend to use the latest electron, so you don't need to setup babel with webpack 4.
Go Getting Started page.
Or you can read the full document.
Name | Usage | Version | Location | Runtime Envrionment |
---|---|---|---|---|
@xmcl/core | Launch Minecraft | packages/core | Node | |
@xmcl/installer | Install Minecraft | packages/installer | Node | |
@xmcl/user | User Authentication and skin | packages/user | Node/Browser | |
@xmcl/mod-parser | Parse forge/liteloader/fabric mod | packages/mod-parser | Node/Browser | |
@xmcl/modrinth | Provide Modrinth API | packages/modrinth | Node/Browser | |
@xmcl/forge-site-parser | Parse forge website | packages/forge-site-parser | Node/Browser | |
@xmcl/client | Ping Minecraft Server | packages/client | Node | |
@xmcl/model | Display player/block model | packages/model | Browser | |
@xmcl/gamesetting | Parse game setting | packages/gamesetting | Node/Browser | |
@xmcl/nbt | Parse NBT | packages/nbt | Node/Browser | |
@xmcl/text-component | Parse and render Minecraft Text | packages/text-component | Node/Browser | |
@xmcl/world | Load save metadata | packages/world | Node/Browser | |
@xmcl/resourcepack | Parse resource pack | packages/resourcepack | Node/Browser | |
@xmcl/server-info | Parse servers.dat | packages/server-info | Node/Browser | |
@xmcl/task | Util package to create task | packages/task | Node | |
@xmcl/system | A fs middleware for browser/node | packages/system | Node/Browser | |
@xmcl/unzip | yauzl unzip wrapper | packages/unzip | Node |
See Contribute.md
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.