Thanks to Cheerpj, this project runs Minecraft (version 1.2.5, released March 2012) on the browser, without the requirement of having the JVM locally installed on the computer.
See the website for a live demo and more information.
Since this is a demo the playing time is restricted to 3 minutes; see here for the full game.
This is not an official Minecraft product. It is not approved by or associated with Mojang or Microsoft, furthermore, the original JARs of the game are downloaded from the official website and used untouched.
For questions and support about CheerpJ and Browsercraft join our Discord server.
First clone the project:
git clone git@github.com:leaningtech/browsercraft.git
Install the dependencies:
cd browsercraft
npm install
Get the Wasm libraries (LWJGL and gl4es) from cheerpj-wasm-libs:
git clone --depth 1 --branch cheerpj-5.0 https://github.com/leaningtech/cheerpj-wasm-libs.git ../cheerpj-wasm-libs
cp ../cheerpj-wasm-libs/lwjgl2/liblwjgl.so ../cheerpj-wasm-libs/gl4es/libgl4es.so static/lwjgl/libraries/
Run in development mode:
npm run dev
The site will be available at localhost:5173