Eaglercraft compiles the Minecraft 1.5.2 Java codebase to JavaScript using TeaVM via a Gradle build. The primary output isDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/lDEVinux/eaglercraft/llms.txt
Use this file to discover all available pages before exploring further.
classes.js (the browser client) and classes_server.js (the integrated singleplayer server worker). Custom resource packs are compiled separately as EPK files.
How the Build Works
Thebuild.gradle file applies the io.github.zebalu.teavm-gradle-plugin (version 1.0.0) to transpile Java source into optimized JavaScript. Key details of the build configuration:
- Java compatibility: Source and target are both set to Java 8
- Source sets: Three directories are combined into a single
mainsource set:src/main/java— shared Minecraft client classessrc/teavm/java— TeaVM-specific adapter and entry pointsp-server/src/ipc/java— singleplayer server IPC bridge
- Main class:
net.lax1dude.eaglercraft.Client(defined insrc/teavm/java) - Entry point name:
main - Output file:
javascript/classes.js - Optimization level:
ADVANCED— produces highly compact, aggressively inlined output - Heap size: 4 MB minimum / 128 MB maximum for the TeaVM virtual machine
Prerequisites
Before building, ensure the following are installed:- Java JDK 8 — a full JDK is required (not just a JRE); TeaVM performs bytecode analysis at compile time
- Gradle — you can use the included
gradlew/gradlew.batwrapper and do not need a separate Gradle installation
Compiling the JavaScript Client
Wait for compilation to finish
The
ADVANCED optimization level performs thorough whole-program analysis and inlining. Expect the build to take several minutes depending on your hardware.The LWJGL desktop runtime (
src/lwjgl/) is no longer supported and is included in the repository for historical reference only. Only the TeaVM (web) compilation target should be used.Compile Configuration
The following block shows the key TeaVM settings frombuild.gradle:
build.gradle
Compiling Resource Packs (EPK)
Game assets (textures, sounds, and other resources) are stored inlwjgl-rundir/resources/ and must be compiled into a single assets.epk archive that the browser client loads at runtime. The epkcompiler/run.bat script calls:
javascript/assets.epk.
Deploying Compiled Output
After a successful build, copy the following files to your web server to replace the pre-built stable-download versions:javascript/classes.jsjavascript/assets.epk