Update Source Code for less errors during compilation

This commit is contained in:
Milan Bauer 2025-07-26 19:30:29 +02:00
commit 369de544c3
23149 changed files with 819380 additions and 526977 deletions

0
.gitattributes vendored Executable file → Normal file
View file

0
.gitignore vendored Executable file → Normal file
View file

10
CompileEPK.bat Executable file → Normal file
View file

@ -1,6 +1,6 @@
@echo off
title epkcompiler
echo compiling, please wait...
java -jar "desktopRuntime/CompileEPK.jar" "desktopRuntime/resources" "javascript/assets.epk"
echo finished compiling epk
@echo off
title epkcompiler
echo compiling, please wait...
java -jar "desktopRuntime/CompileEPK.jar" "desktopRuntime/resources" "javascript/assets.epk"
echo finished compiling epk
pause

0
CompileJS.bat Executable file → Normal file
View file

View file

@ -1,3 +1,3 @@
#!/bin/sh
chmod +x gradlew
./gradlew generateJavascript
./gradlew --rerun-tasks -- generateJavascript

0
EAGLERCRAFTX_README.md Executable file → Normal file
View file

6
MakeOfflineDownload.bat Executable file → Normal file
View file

@ -1,4 +1,4 @@
@echo off
title MakeOfflineDownload
java -cp "desktopRuntime/MakeOfflineDownload.jar;desktopRuntime/CompileEPK.jar" net.lax1dude.eaglercraft.v1_8.buildtools.workspace.MakeOfflineDownload "javascript/OfflineDownloadTemplate.txt" "javascript/classes.js" "javascript/assets.epk" "javascript/EaglercraftX_1.8_Offline_en_US.html" "javascript/EaglercraftX_1.8_Offline_International.html" "javascript/lang"
@echo off
title MakeOfflineDownload
java -cp "desktopRuntime/MakeOfflineDownload.jar;desktopRuntime/CompileEPK.jar" net.lax1dude.eaglercraft.v1_8.buildtools.workspace.MakeOfflineDownload "javascript/OfflineDownloadTemplate.txt" "javascript/classes.js" "javascript/assets.epk" "javascript/EaglercraftX_1.8_Offline_en_US.html" "javascript/EaglercraftX_1.8_Offline_International.html" "javascript/lang"
pause

6
MakeSignedClient.bat Executable file → Normal file
View file

@ -1,4 +1,4 @@
@echo off
title MakeSignedClient
java -cp "desktopRuntime/MakeOfflineDownload.jar;desktopRuntime/CompileEPK.jar" net.lax1dude.eaglercraft.v1_8.buildtools.workspace.MakeSignedClient "javascript/SignedBundleTemplate.txt" "javascript/classes.js" "javascript/assets.epk" "javascript/lang" "javascript/SignedClientTemplate.txt" "javascript/UpdateDownloadSources.txt" "javascript/EaglercraftX_1.8_Offline_Signed_Client.html"
@echo off
title MakeSignedClient
java -cp "desktopRuntime/MakeOfflineDownload.jar;desktopRuntime/CompileEPK.jar" net.lax1dude.eaglercraft.v1_8.buildtools.workspace.MakeSignedClient "javascript/SignedBundleTemplate.txt" "javascript/classes.js" "javascript/assets.epk" "javascript/lang" "javascript/SignedClientTemplate.txt" "javascript/UpdateDownloadSources.txt" "javascript/EaglercraftX_1.8_Offline_Signed_Client.html"
pause

0
README.md Executable file → Normal file
View file

255
build.gradle Executable file → Normal file
View file

@ -1,73 +1,184 @@
import org.teavm.gradle.api.OptimizationLevel
buildscript {
dependencies {
classpath files("src/teavmc-classpath/resources")
}
}
plugins {
id "java"
id "eclipse"
id "org.teavm" version "0.9.2"
}
sourceSets {
main {
java {
srcDirs(
"src/main/java",
"src/game/java",
"src/protocol-game/java",
"src/protocol-relay/java",
"src/teavm/java",
"src/teavm-boot-menu/java"
)
}
}
}
repositories {
mavenCentral()
}
dependencies {
teavm(teavm.libs.jso)
teavm(teavm.libs.jsoApis)
compileOnly "org.teavm:teavm-core:0.9.2" // workaround for a few hacks
}
def folder = "javascript"
def name = "classes.js"
teavm.js {
compileJava.options.encoding = "UTF-8"
obfuscated = true
sourceMap = true
targetFileName = "../" + name
optimization = OptimizationLevel.BALANCED // Change to "AGGRESSIVE" for release
outOfProcess = false
fastGlobalAnalysis = false
processMemory = 512
entryPointName = "main"
mainClass = "net.lax1dude.eaglercraft.v1_8.internal.teavm.MainClass"
outputDir = file(folder)
properties = [ "java.util.TimeZone.autodetect": "true" ]
debugInformation = false
}
tasks.named("generateJavaScript") {
doLast {
// NOTE: This step may break at any time, and is not required for 99% of browsers
def phile = file(folder + "/" + name)
def dest = phile.getText("UTF-8")
def i = dest.substring(0, dest.indexOf("=\$rt_globals.Symbol('jsoClass');")).lastIndexOf("let ")
dest = dest.substring(0, i) + "var" + dest.substring(i + 3)
def j = dest.indexOf("function(\$rt_globals,\$rt_exports){")
dest = dest.substring(0, j + 34) + "\n" + file(folder + "/ES6ShimScript.txt").getText("UTF-8") + "\n" + dest.substring(j + 34)
phile.write(dest, "UTF-8")
}
import org.teavm.gradle.api.OptimizationLevel
buildscript {
repositories {
mavenLocal()
maven { url = 'https://maven.minecraftforge.net' }
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath files("src/teavmc-classpath/resources")
classpath 'net.minecraftforge.gradle:ForgeGradle:6+'
classpath "gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext:1.1.3"
}
}
import net.minecraftforge.gradle.common.util.Utils
import net.minecraftforge.gradle.common.util.VersionJson
plugins {
id "java"
id "eclipse"
id "org.teavm" version "0.9.2"
}
sourceSets {
main {
java {
srcDirs(
"src/main/java",
"src/game/java",
"src/protocol-game/java",
"src/protocol-relay/java",
"src/teavm/java",
"src/teavm-boot-menu/java"
)
}
}
}
repositories {
mavenCentral()
maven { url = 'https://libraries.minecraft.net/' }
maven { url = 'https://maven.minecraftforge.net' }
}
dependencies {
teavm(teavm.libs.jso)
teavm(teavm.libs.jsoApis)
compileOnly "org.teavm:teavm-core:0.9.2" // workaround for a few hacks
// Minecraft 1.21.5 relevante Dependencies
implementation 'org.apache.logging.log4j:log4j-api:2.24.1'
implementation 'org.apache.logging.log4j:log4j-slf4j2-impl:2.24.1'
implementation 'org.apache.logging.log4j:log4j-core:2.24.1'
implementation 'org.apache.httpcomponents:httpcore:4.4.16'
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
implementation 'org.apache.commons:commons-lang3:3.17.0'
implementation 'org.apache.commons:commons-compress:1.27.1'
implementation 'org.lwjgl:lwjgl-glfw:3.3.3'
implementation 'org.lwjgl:lwjgl:3.3.3'
implementation 'org.lwjgl:lwjgl-jemalloc:3.3.3'
implementation 'org.lwjgl:lwjgl-opengl:3.3.3'
implementation 'org.lwjgl:lwjgl-freetype:3.3.3'
implementation 'org.lwjgl:lwjgl-stb:3.3.3'
implementation 'org.lwjgl:lwjgl-tinyfd:3.3.3'
implementation 'org.lwjgl:lwjgl-openal:3.3.3'
implementation 'org.joml:joml:1.10.8'
implementation 'org.lz4:lz4-java:1.8.0'
implementation 'org.ow2.asm:asm:9.6'
implementation 'org.slf4j:slf4j-api:2.0.16'
implementation 'org.jcraft:jorbis:0.0.17'
implementation 'org.jetbrains:annotations:24.1.0'
implementation 'it.unimi.dsi:fastutil:8.5.15'
implementation 'commons-io:commons-io:2.17.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.4.2'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.13.4'
implementation 'com.fasterxml.jackson.core:jackson-core:2.13.4'
implementation 'com.ibm.icu:icu4j:76.1'
implementation 'com.microsoft.azure:msal4j:1.17.2'
implementation 'com.mojang:brigadier:1.3.10'
implementation 'com.mojang:datafixerupper:8.0.16'
implementation 'com.mojang:authlib:6.0.58'
implementation 'com.mojang:text2speech:1.18.11'
implementation 'com.mojang:blocklist:1.0.10'
implementation 'com.google.guava:guava:33.3.1-jre'
implementation 'com.google.code.gson:gson:2.11.0'
implementation 'com.github.oshi:oshi-core:6.6.5'
implementation 'com.github.stephenc.jcip:jcip-annotations:1.0-1'
implementation 'com.nimbusds:content-type:2.3'
implementation 'com.nimbusds:nimbus-jose-jwt:9.40'
implementation 'com.nimbusds:lang-tag:1.7'
implementation 'com.nimbusds:oauth2-oidc-sdk:11.18'
implementation 'commons-codec:commons-codec:1.17.1'
implementation 'io.netty:netty-transport:4.1.118.Final'
implementation 'io.netty:netty-transport-classes-epoll:4.1.118.Final'
implementation 'io.netty:netty-handler:4.1.118.Final'
implementation 'io.netty:netty-buffer:4.1.118.Final'
implementation 'io.netty:netty-resolver:4.1.118.Final'
implementation 'io.netty:netty-transport-native-unix-common:4.1.118.Final'
implementation 'io.netty:netty-common:4.1.118.Final'
implementation 'io.netty:netty-codec:4.1.118.Final'
implementation 'net.sf.jopt-simple:jopt-simple:5.0.4'
implementation 'net.java.dev.jna:jna-platform:5.15.0'
implementation 'net.java.dev.jna:jna:5.15.0'
implementation 'net.minecraftforge:forge:1.20.4-49.0.50'
implementation 'net.minecraftforge:forgespi:7.0.0'
implementation 'net.minidev:json-smart:2.5.1'
implementation 'net.minidev:accessors-smart:2.5.1'
implementation 'commons-logging:commons-logging:1.3.4'
implementation 'ca.weblite:java-objc-bridge:1.1'
implementation 'org.json:json:20240303'
//implementation files('com/mojang/logging/1.5.10/logging-1.5.10.jar')
//implementation files('com/mojang/jtracy/1.0.29/jtracy-1.0.29.jar')
//implementation files('com/mojang/jtracy/1.0.29/jtracy-1.0.29-natives-windows.jar')
//implementation files('com/mojang/patchy/2.2.10/patchy-2.2.10.jar')
// Lokale JARs (nur falls online nicht verfügbar)
implementation files(
'src/jars/org/lwjgl/lwjgl-glfw/3.3.3/lwjgl-glfw-3.3.3-natives-windows-x86.jar',
'src/jars/org/lwjgl/lwjgl-glfw/3.3.3/lwjgl-glfw-3.3.3-natives-windows.jar',
'src/jars/org/lwjgl/lwjgl-glfw/3.3.3/lwjgl-glfw-3.3.3-natives-windows-arm64.jar',
'src/jars/org/lwjgl/lwjgl/3.3.3/lwjgl-3.3.3-natives-windows-x86.jar',
'src/jars/org/lwjgl/lwjgl/3.3.3/lwjgl-3.3.3-natives-windows-arm64.jar',
'src/jars/org/lwjgl/lwjgl/3.3.3/lwjgl-3.3.3-natives-windows.jar',
'src/jars/org/lwjgl/lwjgl-jemalloc/3.3.3/lwjgl-jemalloc-3.3.3-natives-windows-x86.jar',
'src/jars/org/lwjgl/lwjgl-jemalloc/3.3.3/lwjgl-jemalloc-3.3.3-natives-windows-arm64.jar',
'src/jars/org/lwjgl/lwjgl-jemalloc/3.3.3/lwjgl-jemalloc-3.3.3-natives-windows.jar',
'src/jars/org/lwjgl/lwjgl-opengl/3.3.3/lwjgl-opengl-3.3.3-natives-windows.jar',
'src/jars/org/lwjgl/lwjgl-opengl/3.3.3/lwjgl-opengl-3.3.3-natives-windows-x86.jar',
'src/jars/org/lwjgl/lwjgl-opengl/3.3.3/lwjgl-opengl-3.3.3-natives-windows-arm64.jar',
'src/jars/org/lwjgl/lwjgl-freetype/3.3.3/lwjgl-freetype-3.3.3-natives-windows-arm64.jar',
'src/jars/org/lwjgl/lwjgl-freetype/3.3.3/lwjgl-freetype-3.3.3-natives-windows.jar',
'src/jars/org/lwjgl/lwjgl-freetype/3.3.3/lwjgl-freetype-3.3.3-natives-windows-x86.jar',
'src/jars/org/lwjgl/lwjgl-stb/3.3.3/lwjgl-stb-3.3.3-natives-windows.jar',
'src/jars/org/lwjgl/lwjgl-stb/3.3.3/lwjgl-stb-3.3.3-natives-windows-x86.jar',
'src/jars/org/lwjgl/lwjgl-stb/3.3.3/lwjgl-stb-3.3.3-natives-windows-arm64.jar',
'src/jars/org/lwjgl/lwjgl-tinyfd/3.3.3/lwjgl-tinyfd-3.3.3-natives-windows.jar',
'src/jars/org/lwjgl/lwjgl-tinyfd/3.3.3/lwjgl-tinyfd-3.3.3-natives-windows-arm64.jar',
'src/jars/org/lwjgl/lwjgl-tinyfd/3.3.3/lwjgl-tinyfd-3.3.3-natives-windows-x86.jar',
'src/jars/org/lwjgl/lwjgl-openal/3.3.3/lwjgl-openal-3.3.3-natives-windows-arm64.jar',
'src/jars/org/lwjgl/lwjgl-openal/3.3.3/lwjgl-openal-3.3.3-natives-windows-x86.jar',
'src/jars/org/lwjgl/lwjgl-openal/3.3.3/lwjgl-openal-3.3.3-natives-windows.jar',
// Die folgenden JARs sind NICHT öffentlich verfügbar:
'src/jars/com/mojang/jtracy/1.0.29/jtracy-1.0.29.jar',
'src/jars/com/mojang/jtracy/1.0.29/jtracy-1.0.29-natives-windows.jar',
'src/jars/com/mojang/patchy/2.2.10/patchy-2.2.10.jar',
'src/jars/com/mojang/logging/1.5.10/logging-1.5.10.jar'
)
}
def folder = "javascript"
def name = "classes.js"
teavm.js {
compileJava.options.encoding = "UTF-8"
obfuscated = true
sourceMap = true
targetFileName = "../" + name
optimization = OptimizationLevel.BALANCED // Change to "AGGRESSIVE" for release
outOfProcess = false
fastGlobalAnalysis = false
processMemory = 512
entryPointName = "main"
mainClass = "net.lax1dude.eaglercraft.v1_8.internal.teavm.MainClass"
outputDir = file(folder)
properties = [ "java.util.TimeZone.autodetect": "true" ]
debugInformation = false
}
tasks.named("generateJavaScript") {
doLast {
// NOTE: This step may break at any time, and is not required for 99% of browsers
def phile = file(folder + "/" + name)
def dest = phile.getText("UTF-8")
def i = dest.substring(0, dest.indexOf("=\$rt_globals.Symbol('jsoClass');")).lastIndexOf("let ")
dest = dest.substring(0, i) + "var" + dest.substring(i + 3)
def j = dest.indexOf("function(\$rt_globals,\$rt_exports){")
dest = dest.substring(0, j + 34) + "\n" + file(folder + "/ES6ShimScript.txt").getText("UTF-8") + "\n" + dest.substring(j + 34)
phile.write(dest, "UTF-8")
}
}

0
desktopRuntime/CompileEPK.jar Executable file → Normal file
View file

View file

0
desktopRuntime/LICENSE Executable file → Normal file
View file

0
desktopRuntime/MakeOfflineDownload.jar Executable file → Normal file
View file

0
desktopRuntime/OpenAL.dll Executable file → Normal file
View file

0
desktopRuntime/RTWebViewClient.html Executable file → Normal file
View file

0
desktopRuntime/UnsafeMemcpy.dll Executable file → Normal file
View file

0
desktopRuntime/UnsafeMemcpy.jar Executable file → Normal file
View file

0
desktopRuntime/angle_license.txt Executable file → Normal file
View file

0
desktopRuntime/codecjorbis-20101023.jar Executable file → Normal file
View file

0
desktopRuntime/codecwav-20101023.jar Executable file → Normal file
View file

0
desktopRuntime/d3dcompiler_47.dll Executable file → Normal file
View file

0
desktopRuntime/eclipseProject/.classpath Executable file → Normal file
View file

0
desktopRuntime/eclipseProject/.project Executable file → Normal file
View file

View file

View file

View file

View file

0
desktopRuntime/eclipseProject/deps_fix/lwjgl-egl.jar Executable file → Normal file
View file

0
desktopRuntime/eclipseProject/deps_fix/lwjgl-glfw.jar Executable file → Normal file
View file

View file

View file

View file

0
desktopRuntime/eclipseProject/deps_fix/lwjgl.jar Executable file → Normal file
View file

View file

View file

View file

0
desktopRuntime/glfw.dll Executable file → Normal file
View file

0
desktopRuntime/glfw_license.txt Executable file → Normal file
View file

0
desktopRuntime/icon16.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 488 B

After

Width:  |  Height:  |  Size: 488 B

Before After
Before After

0
desktopRuntime/icon32.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before After
Before After

0
desktopRuntime/javadoc/lwjgl-egl-javadoc.jar Executable file → Normal file
View file

0
desktopRuntime/javadoc/lwjgl-glfw-javadoc.jar Executable file → Normal file
View file

0
desktopRuntime/javadoc/lwjgl-javadoc.jar Executable file → Normal file
View file

0
desktopRuntime/javadoc/lwjgl-jemalloc-javadoc.jar Executable file → Normal file
View file

0
desktopRuntime/javadoc/lwjgl-openal-javadoc.jar Executable file → Normal file
View file

0
desktopRuntime/javadoc/lwjgl-opengles-javadoc.jar Executable file → Normal file
View file

0
desktopRuntime/jemalloc.dll Executable file → Normal file
View file

0
desktopRuntime/jemalloc_license.txt Executable file → Normal file
View file

0
desktopRuntime/khronos_license.txt Executable file → Normal file
View file

0
desktopRuntime/libEGL.dll Executable file → Normal file
View file

0
desktopRuntime/libEGL.so.1 Executable file → Normal file
View file

0
desktopRuntime/libGLESv2.dll Executable file → Normal file
View file

0
desktopRuntime/libGLESv2.so Executable file → Normal file
View file

0
desktopRuntime/libUnsafeMemcpy.so Executable file → Normal file
View file

0
desktopRuntime/libffi_license.txt Executable file → Normal file
View file

0
desktopRuntime/libglfw.so Executable file → Normal file
View file

0
desktopRuntime/libjemalloc.so Executable file → Normal file
View file

0
desktopRuntime/liblwjgl.so Executable file → Normal file
View file

0
desktopRuntime/liblwjgl_opengles.so Executable file → Normal file
View file

0
desktopRuntime/libopenal.so Executable file → Normal file
View file

0
desktopRuntime/liburing_license.txt Executable file → Normal file
View file

0
desktopRuntime/libvulkan.so.1 Executable file → Normal file
View file

0
desktopRuntime/libwebrtc-java.so Executable file → Normal file
View file

0
desktopRuntime/lwjgl-egl.jar Executable file → Normal file
View file

0
desktopRuntime/lwjgl-glfw.jar Executable file → Normal file
View file

0
desktopRuntime/lwjgl-jemalloc.jar Executable file → Normal file
View file

0
desktopRuntime/lwjgl-openal.jar Executable file → Normal file
View file

0
desktopRuntime/lwjgl-opengles.jar Executable file → Normal file
View file

0
desktopRuntime/lwjgl.dll Executable file → Normal file
View file

0
desktopRuntime/lwjgl.jar Executable file → Normal file
View file

0
desktopRuntime/lwjgl_opengles.dll Executable file → Normal file
View file

0
desktopRuntime/openal_soft_license.txt Executable file → Normal file
View file

0
desktopRuntime/resources/EPKVersionIdentifier.txt Executable file → Normal file
View file

0
desktopRuntime/resources/SignedClientTemplate.txt Executable file → Normal file
View file

0
desktopRuntime/resources/assets/eagler/CREDITS.txt Executable file → Normal file
View file

View file

View file

View file

View file

View file

Some files were not shown because too many files have changed in this diff Show more