This folder contains the Gradle project for compiling the EaglercraftX 1.8 client to WASM. This requires a special fork of TeaVM that has been modified for Eaglercraft. The settings.gradle and build.gradle are set up to download the binaries automatically but if you would like to build the TeaVM fork yourself you can use the TeaVM fork’s publishToMavenLocal gradle task and replace the URL maven repository declarations in the gradle build scripts with mavenLocal() instead.
TeaVM Fork: https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm/tree/eagler-r1
CompileEPK to compile the assets.epk fileCompileWASM to compile the classes.wasm fileCompileEagRuntimeJS to compile the eagruntime.js fileMakeWASMClientBundle to bundle the client into an EPW fileThe final assets.epw and offline download will be in the “javascript_dist” folder
CompileBootstrapJS to recompile bootstrap.js in the javascript_dist folderCompileLoaderWASMto recompile loader.js and loader.wasm (requires emscripten)@Async or any sort of callback (like addEventListener) in your Java, you must implement async functions in JavaScript in ../src/wasm-gc-teavm/js, using JSPI to suspend/resume the thread for promises, or by pushing events into a queue that you can poll from your Java for event handlers.@Import will not catch exceptions, if you want proper exception handling you must call the imported function through the JSO