mirror of
https://gitflic.ru/project/lax1dude/eaglercraft-1_8-workspace.git
synced 2025-07-22 13:41:15 -09:00
u51
This commit is contained in:
parent
6276a0e37c
commit
256de07b79
4
.gitattributes
vendored
4
.gitattributes
vendored
@ -1,7 +1,3 @@
|
||||
#
|
||||
# https://help.github.com/articles/dealing-with-line-endings/
|
||||
#
|
||||
|
||||
*.bat text eol=crlf
|
||||
*.sh text eol=lf
|
||||
gradlew text eol=lf
|
23
.gitignore
vendored
23
.gitignore
vendored
@ -2,16 +2,15 @@
|
||||
.settings
|
||||
.classpath
|
||||
.project
|
||||
build
|
||||
bin
|
||||
proxyServer/bin
|
||||
proxyServer/rundir
|
||||
desktopRuntime/_eagstorage*
|
||||
desktopRuntime/eclipseProject/bin*
|
||||
desktopRuntime/hs_err_*
|
||||
desktopRuntime/crash-reports/*
|
||||
desktopRuntime/options.txt
|
||||
desktopRuntime/_eagstorage*
|
||||
desktopRuntime/filesystem/*
|
||||
desktopRuntime/downloads/*
|
||||
desktopRuntime/screenshots/*
|
||||
/build
|
||||
/target_*/build
|
||||
/desktopRuntime/_eagstorage*
|
||||
/desktopRuntime/eclipseProject/bin*
|
||||
/desktopRuntime/hs_err_*
|
||||
/desktopRuntime/crash-reports/*
|
||||
/desktopRuntime/options.txt
|
||||
/desktopRuntime/_eagstorage*
|
||||
/desktopRuntime/filesystem/*
|
||||
/desktopRuntime/downloads/*
|
||||
/desktopRuntime/screenshots/*
|
||||
|
@ -1,6 +0,0 @@
|
||||
@echo off
|
||||
title epkcompiler
|
||||
echo compiling, please wait...
|
||||
java -jar "desktopRuntime/CompileEPK.jar" "desktopRuntime/resources" "javascript/assets.epk"
|
||||
echo finished compiling epk
|
||||
pause
|
@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
java -jar "desktopRuntime/CompileEPK.jar" "desktopRuntime/resources" "javascript/assets.epk"
|
@ -1,4 +0,0 @@
|
||||
@echo off
|
||||
title gradlew generateJavascript
|
||||
call gradlew generateJavascript
|
||||
pause
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
chmod +x gradlew
|
||||
./gradlew generateJavascript
|
@ -11,7 +11,6 @@
|
||||
- **Source code to provide the LWJGL keyboard, mouse, and OpenGL APIs in a browser**
|
||||
- **Patch files to mod the Minecraft 1.8 source code to make it browser compatible**
|
||||
- **Browser-modified portions of Minecraft 1.8's open-source dependencies**
|
||||
- **Plugins for Minecraft servers to allow the eagler client to connect to them**
|
||||
|
||||
### This repository does NOT contain:
|
||||
|
||||
@ -49,9 +48,9 @@ The JavaScript runtime of EaglercraftX 1.8 is currently known to work on browser
|
||||
|
||||
## WebAssembly GC Support
|
||||
|
||||
EaglercraftX 1.8 also has an experimental WebAssembly GC (WASM-GC) runtime, almost all of the features supported on the JavaScript runtime are also supported on the WebAssembly GC runtime, however it is still incompatible with several major browsers (especially Safari) and will not run in Chrome unless you can access the `chrome://flags` menu or request an origin trial token from Google for your website. Its based on experimental technology and may still crash sometimes due to browser bugs or unresolved issues in the Java to WASM compiler. Hopefully in the coming months the required feature (JSPI, WebAssembly JavaScript Promise Integration) will become enabled by default on the Chrome browser. It performs significantly better than the JavaScript client, around 50% more FPS and TPS in some cases, and will hopefully replace it someday. Just make sure you enable VSync when you play it, otherwise the game will run "too fast" and choke the browser's event loop, causing input lag.
|
||||
EaglercraftX 1.8 also has an experimental WebAssembly GC (WASM-GC) runtime, almost all of the features supported on the JavaScript runtime are also supported on the WebAssembly GC runtime, however it is still incompatible with several major browsers (especially Safari) and will not run in Chrome unless you can access the `chrome://flags` menu or request an origin trial token from Google for your website. Its based on experimental technology and may still crash sometimes, mostly due to browser bugs. Hopefully in the coming months the required feature (JSPI, WebAssembly JavaScript Promise Integration) will become enabled by default on the Chrome browser. It performs significantly better than the JavaScript client, around 50% more FPS and TPS in some cases, and will hopefully replace it someday. Just make sure you enable VSync when you play it, otherwise the game will run "too fast" and choke the browser's event loop, causing input lag.
|
||||
|
||||
You can compile the WebAssembly GC runtime by creating a development environment (workspace) and reading the README in the "wasm_gc_teavm" folder.
|
||||
There is no GUI for compiling the WASM-GC client at the moment, you need to compile it using the `MakeWASMClientBundle` script in the development environment.
|
||||
|
||||
## Singleplayer
|
||||
|
||||
@ -85,57 +84,7 @@ If you are creating a resource pack and want to disable the blur filter on the m
|
||||
|
||||
## Making a Server
|
||||
|
||||
To make a server for EaglercraftX 1.8 the recommended software to use is EaglercraftXBungee ("EaglerXBungee") which is included in this repository in the `gateway/EaglercraftXBungee` folder. This is a plugin designed to be used with BungeeCord to allow Eaglercraft players to join your BungeeCord server. It is assumed that the reader already knows what BungeeCord is and has a working server set up that is joinable via java edition. If you don't know what BungeeCord is, please research the topic yourself first before continuing. Waterfall and FlameCord have also been tested, but EaglerXBungee was natively compiled against BungeeCord.
|
||||
|
||||
There is an experimental velocity plugin available in `gateway/EaglercraftXVelocity` but it is still in development and not recommended for public servers, so be sure to check for updates regularly if you use it. Configuration files are basically identical to EaglercraftXBungee so its safe to just directy copy in your old EaglercraftXBungee config files to the `plugins/eaglerxvelocity` folder and they should work with a minimal number of edits if you are migrating your network from BungeeCord to Velocity.
|
||||
|
||||
**Warning:** Both EaglerXBungee and EaglerXVelocity perform a lot of reflection that will inevitably break after a while when BungeeCord or Velocity is updated upstream. Both plugins will display the precise build number of BungeeCord and Velocity that has been tested by the developers and known to be compatible with EaglerXBungee and EaglerXVelocity when the proxy first starts up. If you are experiencing issues, try checking the BungeeCord or Velocity website for old versions and find the closest version number to whatever the current compatible version number is that is printed by EaglerXBungee/EaglerXVelocity, it will probably fix whatever missing functions the error messages are complaining about.
|
||||
|
||||
### Detailed READMEs
|
||||
|
||||
- [**EaglerXBungee README**](README_EAGLERXBUNGEE.md)
|
||||
- [**EaglerXVelocity README**](README_EAGLERXVELOCITY.md)
|
||||
- [**EaglerXBukkitAPI README**](README_EAGLERXBUKKITAPI.md)
|
||||
|
||||
### Installation
|
||||
|
||||
Obtain the latest version of the EaglerXBungee JAR file (it can be downloaded in the client from the "Multiplayer" screen) and place it in the "plugins" folder of your BungeeCord server. It's recommended to only join native Minecraft 1.8 servers through an EaglerXBungee server but plugins like ProtocolSupport have allowed some people to join newer servers too.
|
||||
|
||||
Configuration files and other plugin data will be written in `plugins/EaglercraftXBungee`
|
||||
|
||||
### Online Mode Instructions
|
||||
|
||||
1. Enable `online_mode` in BungeeCord's `config.yml` file and make sure it works
|
||||
2. Join the BungeeCord server using Minecraft Java Edition while logged into your Microsoft account
|
||||
3. Run the `/eagler` command, it will give you a temporary login code
|
||||
4. Disconnect from the server, close java edition, launch EaglercraftX 1.8
|
||||
5. Set your profile username to the username of your Microsoft account
|
||||
6. Go to the "Multiplayer" menu, press "Direct Connect", press "Connect to Server", then enter "ws://localhost:8081/"
|
||||
7. If you are using a VPS, replace "localhost" with the IP address of the VPS when you connect
|
||||
8. Press "Join Server", a login screen will be displayed, enter the temporary login code into the password field
|
||||
9. EaglerXBungee will log you into the server as the Microsoft account you generated the login code with
|
||||
|
||||
Players using EaglercraftX will be able to see the vanilla skins of players on the server using vanilla Minecraft, but players on the server using vanilla Minecraft won't be able to see the skins of players using Eaglercraft. Instead they will see the skin of the Minecraft account that was used when the Eaglercraft player originally ran the `/eagler` command.
|
||||
|
||||
To disable this vanilla player skin feature and stop the plugin from downloading the textures of any player heads spawned with commands, edit the EaglercraftXBungee `settings.yml` file in the `plugins/EaglercraftXBungee` folder and change `download_vanilla_skins_to_clients` to `false`. Ratelimits configured in `settings.yml` define the maximum number of times per minute a single player is allowed to trigger profile/skin lookups and also define the maximum number of times per minute the entire server is allowed to actually perform profile/skin lookups.
|
||||
|
||||
By default, EaglercraftXBungee will use a local SQLite database in the server's working directory to store player skins and authentication codes. SQLite will be downloaded automatically if it is not already present. If you would like to use MySQL or something else instead, EaglercraftXBungee is JDBC-based and supports any database type that you can find a driver for. You can set the path of the database, path of the driver JAR, and the name of the driver class (example: `org.sqlite.JDBC`) for storing player skins in `settings.yml` and for storing login codes and profiles in `authservice.yml`.
|
||||
|
||||
### Offline Mode Instructions
|
||||
|
||||
By setting `online_mode` to `false` in the BungeeCord `config.yml` the authentication system will be disabled and players will no longer be required to first generate a code to log in. This should only be used for testing or if you can't get the authentication system to work. EaglercraftXBungee's skin system is supposed to be able to display SkinsRestorer skins if you plan to have vanilla players on the server but it's not guaranteed.
|
||||
|
||||
### Built-in HTTP server
|
||||
|
||||
When configuring the EaglercraftXBungee `listeners.yml` file, every listener includes an `http_server` section that can be used to configure the listener to also behave like a regular HTTP server when the websocket address is entered into a browser. If this is disabled people will get the normal "404 Websocket Upgrade Failure" instead when they accidentally type your server address into their browser. `root` defines the path to the folder containing index.html and the other files you want to host, relative to the `plugins/EaglercraftXBungee` folder. This can be useful for hosting the client if the offline download doesn't work for some reason but might slow your BungeeCord server down if lots of people are loading it all the time.
|
||||
|
||||
### Enabling Voice Chat
|
||||
|
||||
Voice chat is disabled by default in EaglercraftXBungee because it is not recommended for use on public servers. To enable it, add or change `allow_voice: true` to your EaglercraftXBungee `listeners.yml` file. The main difference between Eaglercraft 1.5.2 and EaglercraftX 1.8's voice chat feature is that the "Global" channel now only includes other players on the same server as you instead of every single player connected to the same bungeecord proxy. If you would like to disable voice chat on certain servers, add the names of the servers to the `disable_voice_chat_on_servers` list in the EaglercraftXBungee `settings.yml` file. You may have to add this property to the YML file manually if you've upgraded your server from an older version of EaglercraftXBungee.
|
||||
|
||||
### Disabling FNAW Skins
|
||||
|
||||
Players are known to complain about the high-poly Five Nights At Winstons character skins making PVP harder because of the belief that they change a player's hitbox. If you would like to disable those skins in your PVP worlds you can either set `disable_fnaw_skins_everywhere: true` in your EaglercraftXBungee `settings.yml` file to disable them for all players on your whole BungeeCord proxy, or you can disable them on specific servers by adding the names of the servers to the `disable_fnaw_skins_on_servers` list also in `settings.yml` like with disabling voice chat.
|
||||
To make a server for EaglercraftX 1.8 the recommended software to use is EaglercraftXServer ("EaglerXServer"), which you can get from lax1dude here: [https://lax1dude.net/eaglerxserver/](https://lax1dude.net/eaglerxserver/)
|
||||
|
||||
## Launch Options
|
||||
|
||||
@ -259,5 +208,3 @@ The `crashReportShow` hook can be used to capture crash reports and append addit
|
||||
## Developing a Client
|
||||
|
||||
There is currently no system in place to make forks of 1.8 and merge commits made to the patch files in this repository with the patch files or workspace of the fork, you're on your own if you try to keep a fork of this repo for reasons other than to contribute to it
|
||||
|
||||
**Note:** If you are trying to use the desktop runtime on Linux, make sure you add the "desktopRuntime" folder to the `LD_LIBRARY_PATH` environment variable of the Java process. This should be done automatically by the Eclipse project's default run configuration, but it might not work properly on every system, or when the Eclipse project is imported into IntelliJ.
|
||||
|
@ -1,4 +0,0 @@
|
||||
@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
|
@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
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"
|
@ -1,4 +0,0 @@
|
||||
@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
|
@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
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"
|
43
README.md
43
README.md
@ -1,32 +1,31 @@
|
||||
### Java 17 is recommended for compiling to TeaVM
|
||||
# eaglercraft-workspace
|
||||
|
||||
### Java 8 or greater is required for the desktop runtime
|
||||
### Java 17 or greater is required!
|
||||
|
||||
**Most Java IDEs will allow you to import this repository as a gradle project for compiling it to JavaScript.**
|
||||
**To get started, import this entire folder into your IDE as a Gradle project, this will automatically create several different projects to build all the common classes and each runtime.**
|
||||
|
||||
Java must be added to your PATH!
|
||||
The Gradle plugin was created by [cire3](https://github.com/cire3wastaken), and the source code is available [here](https://github.com/The-Resent-Team/open-source-projects).
|
||||
|
||||
**To compile the web client:**
|
||||
1. Run `CompileEPK`
|
||||
2. Run `CompileJS` (or the `generateJavaScript` gradle task in your IDE)
|
||||
3. Check the "javascript" folder
|
||||
**To compile the JavaScript client:**
|
||||
|
||||
**To compile an offline download:**
|
||||
1. Run `CompileEPK`
|
||||
2. Run `CompileJS` (or the `generateJavaScript` gradle task in your IDE)
|
||||
3. Run `MakeOfflineDownload`
|
||||
4. Check the "javascript" folder
|
||||
Run the `MakeOfflineDownload` script in the "target_teavm_javascript" folder (or the `makeMainOfflineDownload` Gradle task in your IDE) to build the JavaScript client. This will build the "classes.js" and "assets.epk" and the offline downloads, the results will be in the "javascript" folder.
|
||||
|
||||
**To compile the WASM GC client:**
|
||||
Consult the [README](wasm_gc_teavm/README.md) in the wasm_gc_teavm folder
|
||||
**To compile the WASM-GC client:**
|
||||
|
||||
**To use the desktop runtime:**
|
||||
1. Import the Eclipse project in "desktopRuntime/eclipseProject" into your IDE
|
||||
2. Open one of the .java files from the source folders (workaround for a bug)
|
||||
3. Run/Debug the client with the included "eaglercraftDebugRuntime" configuration
|
||||
Run the `MakeWASMClientBundle` script in the "target_teavm_wasm_gc" folder (or the `makeMainWasmClientBundle` Gradle task in your IDE) to build the WASM-GC client. This will build the "assets.epw" file which contains all the code and assets if the WASM-GC client, and also create an offline download, the results will be in the "javascript_dist" folder.
|
||||
|
||||
**Note:** If you are trying to use the desktop runtime on Linux, make sure you add the "desktopRuntime" folder to the `LD_LIBRARY_PATH` environment variable of the Java process. This should be done automatically by the Eclipse project's default run configuration, but it might not work properly on every system, or when the Eclipse project is imported into IntelliJ.
|
||||
The WASM-GC client uses a custom fork of TeaVM, the source is available [here](https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm).
|
||||
|
||||
**See the main 1.8 repository's README for more info**
|
||||
**To run the desktop runtime:**
|
||||
|
||||
The source codes of EaglercraftXBungee and EaglercraftXVelocity are not included here.
|
||||
**Note:** Athough it may be tempting to release "desktop" copies of your client, the current desktop runtime was designed for debug use only and is a poor choice for distribution to end users.
|
||||
|
||||
Run the `StartDesktopRuntime` script in the "target_lwjgl_desktop" folder (or the `eaglercraftDebugRuntime` Gradle task in your IDE) to run the desktop runtime. This will run the client using the JVM and an LWJGL3-based runtime, which can be useful for debugging crashes and to speed up testing if you don't want to wait for the JavaScript or WASM-GC client to be built.
|
||||
|
||||
Do not use the desktop runtime as substitute for testing you client in a browser, client developers who only test their client on the desktop runtime usually end up with lots of unexpected bugs and crashes in their browser builds.
|
||||
|
||||
**To debug the desktop runtime:**
|
||||
|
||||
If you want to debug the desktop runtime from your IDE, one way you can do it is by enabling the debugger in the LWJGL target's `eaglercraftDebugRuntime` task, but something that will launch even faster is just creating a run configuration in your IDE directly in the LWJGL target project.
|
||||
|
||||
You can do this by creating a run configuration specifying `net.lax1dude.eaglercraft.v1_8.internal.lwjgl.MainClass` as the main class, the `desktopRuntime` folder as the working directory, `-Xmx1G -Xms1G -Djava.library.path=.` in the JVM arguments, and if you're on Linux you'll also want to add an environment variable to append the `desktopRuntime` folder to `LD_LIBRARY_PATH` and set `__GL_THREADED_OPTIMIZATIONS` to `0` if using Nvidia drivers.
|
||||
|
73
build.gradle
73
build.gradle
@ -1,73 +0,0 @@
|
||||
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")
|
||||
}
|
||||
}
|
51
build.gradle.kts
Executable file
51
build.gradle.kts
Executable file
@ -0,0 +1,51 @@
|
||||
plugins {
|
||||
id("java")
|
||||
}
|
||||
|
||||
allprojects {
|
||||
apply(plugin = "eclipse")
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
plugins.withId("java") {
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(17)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
named("main") {
|
||||
java.srcDirs(
|
||||
"src/main/java",
|
||||
"src/game/java",
|
||||
"src/protocol-game/java",
|
||||
"src/protocol-relay/java",
|
||||
"src/platform-api/java"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(libs.bundles.common)
|
||||
}
|
||||
|
||||
tasks.withType<Jar> {
|
||||
// TeaVM will fail if anything from platform-api is in the JAR
|
||||
fileTree("src/platform-api/java").visit {
|
||||
if (!isDirectory) {
|
||||
if (path.endsWith(".java")) {
|
||||
exclude(path.substring(0, path.length - 5) + ".class")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src_main_java"/>
|
||||
<classpathentry kind="src" path="src_game_java"/>
|
||||
<classpathentry kind="src" path="src_protocol-game_java"/>
|
||||
<classpathentry kind="src" path="src_protocol-relay_java"/>
|
||||
<classpathentry kind="src" path="src_lwjgl_java"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="deps_fix/codecjorbis-20101023.jar"/>
|
||||
<classpathentry kind="lib" path="deps_fix/codecwav-20101023.jar"/>
|
||||
<classpathentry kind="lib" path="deps_fix/Java-WebSocket-1.5.1-with-dependencies.jar"/>
|
||||
<classpathentry kind="lib" path="deps_fix/lwjgl.jar"/>
|
||||
<classpathentry kind="lib" path="deps_fix/lwjgl-egl.jar"/>
|
||||
<classpathentry kind="lib" path="deps_fix/lwjgl-glfw.jar"/>
|
||||
<classpathentry kind="lib" path="deps_fix/lwjgl-jemalloc.jar"/>
|
||||
<classpathentry kind="lib" path="deps_fix/lwjgl-openal.jar"/>
|
||||
<classpathentry kind="lib" path="deps_fix/lwjgl-opengles.jar"/>
|
||||
<classpathentry kind="lib" path="deps_fix/soundsystem-20120107.jar"/>
|
||||
<classpathentry kind="lib" path="deps_fix/webrtc-java-0.8.0.jar"/>
|
||||
<classpathentry kind="lib" path="deps_fix/UnsafeMemcpy.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
@ -1,44 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>eclipseProject</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>src_main_java</name>
|
||||
<type>2</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC../src/main/java</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src_game_java</name>
|
||||
<type>2</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC../src/game/java</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src_protocol-game_java</name>
|
||||
<type>2</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC../src/protocol-game/java</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src_protocol-relay_java</name>
|
||||
<type>2</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC../src/protocol-relay/java</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src_lwjgl_java</name>
|
||||
<type>2</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC../src/lwjgl/java</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
@ -1,15 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.release=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
|
||||
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/eclipseProject/src_lwjgl_java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/MainClass.java"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="1"/>
|
||||
</listAttribute>
|
||||
<mapAttribute key="org.eclipse.debug.core.environmentVariables">
|
||||
<mapEntry key="LD_LIBRARY_PATH" value="${project_loc}/../"/>
|
||||
</mapAttribute>
|
||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||
</listAttribute>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_SHOW_CODEDETAILS_IN_EXCEPTION_MESSAGES" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="net.lax1dude.eaglercraft.v1_8.internal.lwjgl.MainClass"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="eclipseProject"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="eclipseProject"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Djava.library.path=."/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc}/../"/>
|
||||
</launchConfiguration>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
u50
|
||||
u51
|
@ -6,21 +6,20 @@
|
||||
|
||||
- Creator of Eaglercraft
|
||||
- Ported the Minecraft 1.8 src to TeaVM
|
||||
- Wrote HW accelerated OpenGL 1.3 emulator
|
||||
- Wrote the default shader pack
|
||||
- Optimized the Minecraft 1.8 src
|
||||
- Made the platform abstraction layer
|
||||
- Made HW accelerated OpenGL 1.3 emulator
|
||||
- Made the default shader pack
|
||||
- Made the integrated PBR resource pack
|
||||
- Added touch and mobile device support
|
||||
- Wrote all desktop emulation code
|
||||
- Wrote EaglercraftXBungee
|
||||
- Wrote EaglercraftXVelocity
|
||||
- Wrote WebRTC relay server
|
||||
- Wrote voice chat server
|
||||
- Wrote the patch and build system
|
||||
- Made the multiplayer backends
|
||||
- Made the shared world relay server
|
||||
- Made the patch and build system
|
||||
|
||||
ayunami2000:
|
||||
|
||||
- Many bug fixes
|
||||
- WebRTC LAN worlds
|
||||
- WebRTC shared worlds
|
||||
- WebRTC voice chat
|
||||
- Worked on touch support
|
||||
- Made velocity plugin work
|
||||
@ -29,6 +28,11 @@
|
||||
- Added seamless fullscreen
|
||||
- Created the replit
|
||||
|
||||
cire3:
|
||||
|
||||
- Created the Gradle plugin
|
||||
- Proponent of Kotlin DSL
|
||||
|
||||
|
||||
|
||||
Code used within EaglercraftX
|
||||
|
@ -32,34 +32,42 @@ uniform sampler2D u_moonTextures;
|
||||
uniform sampler2D u_cloudsTexture;
|
||||
|
||||
#define MOON_SURFACE 0.9
|
||||
#define MOON_MARGIN 0.0125
|
||||
#define MOON_MARGIN 0.025
|
||||
#define MOON_MARGIN_1NSQ ((1.0 - MOON_MARGIN) * (1.0 - MOON_MARGIN))
|
||||
#define ATMOSPHERE_BIAS 0.02
|
||||
|
||||
void main() {
|
||||
gl_FragDepth = 0.0;
|
||||
vec2 coord2f = v_position2f * 2.0 - 1.0;
|
||||
|
||||
vec2 texUV = (coord2f * (1.0 / (MOON_SURFACE + MOON_MARGIN))) * 0.5 + 0.5;
|
||||
vec2 surfaceCoord2f = coord2f * (1.0 / MOON_SURFACE);
|
||||
float surfaceCoord2fDot = dot(surfaceCoord2f, surfaceCoord2f);
|
||||
vec3 moonNormal3f;
|
||||
vec4 color4f = vec4(0.0);
|
||||
if(texUV == clamp(texUV, vec2(0.0), vec2(1.0))) {
|
||||
color4f = texture(u_moonTextures, texUV);
|
||||
float NdotV = 0.0;
|
||||
float atmos = 1.0;
|
||||
if(surfaceCoord2fDot < MOON_MARGIN_1NSQ) {
|
||||
color4f = texture(u_moonTextures, surfaceCoord2f * 0.5 + 0.5);
|
||||
moonNormal3f.xy = color4f.rg * 2.0 - 1.0;
|
||||
moonNormal3f.z = sqrt(1.0 - dot(moonNormal3f.xy, moonNormal3f.xy));
|
||||
NdotV = max(dot(moonNormal3f, u_lightDir3f), 0.0);
|
||||
atmos = 0.0;
|
||||
}
|
||||
|
||||
vec3 moonNormal3f;
|
||||
moonNormal3f.xy = color4f.rg * 2.0 - 1.0;
|
||||
moonNormal3f.z = sqrt(1.0 - dot(moonNormal3f.xy, moonNormal3f.xy));
|
||||
float NdotV = max(dot(moonNormal3f, u_lightDir3f), 0.0);
|
||||
float stupid = max(-u_lightDir3f.z - 0.5, 0.0) * 1.25;
|
||||
stupid *= stupid * stupid;
|
||||
|
||||
vec3 viewDir = normalize(v_position3f);
|
||||
|
||||
vec2 surfaceCoord2f = coord2f * (1.0 / MOON_SURFACE);
|
||||
vec3 moonAtmosNormalInner3f = vec3(surfaceCoord2f, sqrt(1.0 - dot(surfaceCoord2f, surfaceCoord2f)));
|
||||
vec3 moonAtmosNormalOuter3f = vec3(surfaceCoord2f, sqrt(-1.0 + dot(surfaceCoord2f, surfaceCoord2f)));
|
||||
vec3 moonAtmosNormalInner3f = vec3(surfaceCoord2f, sqrt((MOON_MARGIN_1NSQ + ATMOSPHERE_BIAS) - surfaceCoord2fDot));
|
||||
vec3 moonAtmosNormalOuter3f = vec3(surfaceCoord2f, sqrt((-MOON_MARGIN_1NSQ + ATMOSPHERE_BIAS) + surfaceCoord2fDot));
|
||||
float NdotVInner = max(dot(moonAtmosNormalInner3f, u_lightDir3f), 0.0);
|
||||
float NdotVOuter = max(dot(moonAtmosNormalOuter3f, u_lightDir3f) + 0.65, 0.0);
|
||||
float NdotVOuter = max(dot(moonAtmosNormalOuter3f, u_lightDir3f) + 0.35, 0.0);
|
||||
float atmosInner = max((MOON_SURFACE * 0.2 + stupid) / moonAtmosNormalInner3f.z - 0.2, 0.0);
|
||||
float atmosOuter = max((MOON_SURFACE * 0.2 + stupid) / moonAtmosNormalOuter3f.z - 0.4, 0.0);
|
||||
float atmosTotal = (1.0 - atmos) * NdotVInner * atmosInner + atmos * NdotVOuter * atmosOuter;
|
||||
|
||||
float atmosInner = max((MOON_SURFACE * 0.2) / moonAtmosNormalInner3f.z - 0.2, 0.0);
|
||||
float atmosOuter = max((MOON_SURFACE * 0.2) / moonAtmosNormalOuter3f.z - 0.4, 0.0);
|
||||
|
||||
output4f = vec4(u_moonColor3f * (color4f.b * color4f.b * NdotV + (NdotVInner * atmosInner + NdotVOuter * atmosOuter * vec3(0.8, 0.825, 0.9)) * (0.5 - max(u_lightDir3f.z, 0.0) * 0.25)), 0.0);
|
||||
output4f = vec4(u_moonColor3f * (color4f.b * color4f.b * NdotV + (atmosTotal * vec3(0.42, 0.5, 0.56))), 0.0);
|
||||
|
||||
if(viewDir.y < 0.01) {
|
||||
return;
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "§eHigh Performance PBR",
|
||||
"desc": "Pack made from scratch specifically for this client, designed to give what I call the best balance between quality and performance possible in a browser but obviously that's just my opinion",
|
||||
"vers": "1.4.0",
|
||||
"vers": "1.4.1",
|
||||
"author": "lax1dude",
|
||||
"api_vers": 1,
|
||||
"features": [
|
||||
|
@ -54,13 +54,12 @@ void main() {
|
||||
if(u_dynamicLightCount1i > 0) {
|
||||
vec4 worldPosition4f = u_inverseViewMatrix4f * v_position4f;
|
||||
worldPosition4f.xyz /= worldPosition4f.w;
|
||||
vec3 normalVector3f = normalize(u_inverseViewMatrix4f[2].xyz);
|
||||
int safeLightCount = u_dynamicLightCount1i > 12 ? 0 : u_dynamicLightCount1i;
|
||||
for(int i = 0; i < safeLightCount; ++i) {
|
||||
light = u_dynamicLightArray[i];
|
||||
light.xyz = light.xyz - worldPosition4f.xyz;
|
||||
len = length(light.xyz);
|
||||
diffuse += max(dot(light.xyz / len, normalVector3f) * 0.8 + 0.2, 0.0) * max(light.w - len, 0.0);
|
||||
diffuse += max(light.w - len, 0.0);
|
||||
}
|
||||
blockLight = min(blockLight + diffuse * 0.066667, 1.0);
|
||||
}
|
||||
|
@ -145,12 +145,6 @@ void main() {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef COMPILE_NORMAL_ATTRIB
|
||||
vec3 normal = v_normal3f;
|
||||
#else
|
||||
vec3 normal = u_uniformNormal3f;
|
||||
#endif
|
||||
|
||||
#ifdef COMPILE_ENABLE_LIGHTMAP
|
||||
float diffuse = 0.0;
|
||||
#ifdef COMPILE_LIGHTMAP_ATTRIB
|
||||
@ -163,13 +157,12 @@ void main() {
|
||||
if(u_dynamicLightCount1i > 0) {
|
||||
vec4 worldPosition4f = u_inverseViewMatrix4f * v_position4f;
|
||||
worldPosition4f.xyz /= worldPosition4f.w;
|
||||
vec3 normalVector3f = normalize(mat3(u_inverseViewMatrix4f) * normal);
|
||||
int safeLightCount = u_dynamicLightCount1i > 12 ? 0 : u_dynamicLightCount1i;
|
||||
for(int i = 0; i < safeLightCount; ++i) {
|
||||
light = u_dynamicLightArray[i];
|
||||
light.xyz = light.xyz - worldPosition4f.xyz;
|
||||
len = length(light.xyz);
|
||||
diffuse += max(dot(light.xyz / len, normalVector3f) * 0.8 + 0.2, 0.0) * max(light.w - len, 0.0);
|
||||
diffuse += max(light.w - len, 0.0);
|
||||
}
|
||||
blockLight = min(blockLight + diffuse * 0.066667, 1.0);
|
||||
}
|
||||
@ -190,6 +183,12 @@ void main() {
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef COMPILE_NORMAL_ATTRIB
|
||||
vec3 normal = v_normal3f;
|
||||
#else
|
||||
vec3 normal = u_uniformNormal3f;
|
||||
#endif
|
||||
|
||||
#ifdef COMPILE_ENABLE_MC_LIGHTING
|
||||
#ifndef COMPILE_ENABLE_LIGHTMAP
|
||||
vec4 light;
|
||||
|
@ -207,8 +207,9 @@ eaglercraft.shaders.gui.option.REALISTIC_WATER.desc.3=OFF: render vanilla water
|
||||
eaglercraft.shaders.gui.option.LIGHT_SHAFTS.label=God Rays
|
||||
|
||||
eaglercraft.shaders.gui.option.LIGHT_SHAFTS.desc.0=Render god rays (light shafts) for sunlight and moonlight shadows
|
||||
eaglercraft.shaders.gui.option.LIGHT_SHAFTS.desc.2=ON: render god rays (slower)
|
||||
eaglercraft.shaders.gui.option.LIGHT_SHAFTS.desc.3=OFF: disable god rays (faster)
|
||||
eaglercraft.shaders.gui.option.LIGHT_SHAFTS.desc.2=This shader tends to look unpleasent if the render distance is greater than the shadow map size
|
||||
eaglercraft.shaders.gui.option.LIGHT_SHAFTS.desc.4=ON: render god rays (slower)
|
||||
eaglercraft.shaders.gui.option.LIGHT_SHAFTS.desc.5=OFF: disable god rays (faster)
|
||||
|
||||
eaglercraft.shaders.gui.option.SCREEN_SPACE_REFLECTIONS.label=Raytracing
|
||||
|
||||
@ -760,12 +761,16 @@ eaglercraft.fallbackWebViewScreen.exited=(exited)
|
||||
eaglercraft.fallbackWebViewScreen.openButton=Open
|
||||
eaglercraft.fallbackWebViewScreen.exitButton=Exit
|
||||
|
||||
eaglercraft.webviewPhishingWaring.title=WARNING!!!
|
||||
eaglercraft.webviewPhishingWaring.text0=If you see a login page, think before you enter a password
|
||||
eaglercraft.webviewPhishingWaring.text1=Passwords can be stolen by the owner of this server or website
|
||||
eaglercraft.webviewPhishingWaring.text2=Do not log in to accounts you don't want hackers to steal
|
||||
eaglercraft.webviewPhishingWaring.dontShowAgain=Do not show this message again
|
||||
eaglercraft.webviewPhishingWaring.continue=Continue
|
||||
eaglercraft.webviewPhishingWarning.title=WARNING!!!
|
||||
eaglercraft.webviewPhishingWarning.text0=If you see a login page, think before you enter a password
|
||||
eaglercraft.webviewPhishingWarning.text1=Passwords can be stolen by the owner of this server or website
|
||||
eaglercraft.webviewPhishingWarning.text2=Do not log in to accounts you don't want hackers to steal
|
||||
eaglercraft.webviewPhishingWarning.dontShowAgain=Do not show this message again
|
||||
eaglercraft.webviewPhishingWarning.continue=Continue
|
||||
|
||||
eaglercraft.webviewDisplayWarning.title=WebView Warning
|
||||
eaglercraft.webviewDisplayWarning.text0=This server is attempting to display HTML content
|
||||
eaglercraft.webviewDisplayWarning.text1=Would you like to continue?
|
||||
|
||||
eaglercraft.notifications.title=Notifications
|
||||
eaglercraft.notifications.priority=Priority: %s
|
||||
|
Binary file not shown.
@ -1 +0,0 @@
|
||||
{"pluginName":"EaglercraftXBungee","pluginVersion":"1.3.6","pluginButton":"Download \"EaglerXBungee-1.3.6.jar\"","pluginFilename":"EaglerXBungee.zip"}
|
Binary file not shown.
Binary file not shown.
@ -1 +1,2 @@
|
||||
org.gradle.jvmargs=-Xmx2G -Xms2G
|
||||
org.gradle.jvmargs=-Xmx4G -Xms4G
|
||||
org.gradle.problems.report=false
|
12
gradle/libs.versions.toml
Executable file
12
gradle/libs.versions.toml
Executable file
@ -0,0 +1,12 @@
|
||||
[libraries]
|
||||
hppc = "com.carrotsearch:hppc:0.10.0"
|
||||
jsr305 = "com.google.code.findbugs:jsr305:3.0.2"
|
||||
lang3 = "org.apache.commons:commons-lang3:3.6"
|
||||
jorbis = "org.jcraft:jorbis:0.0.17"
|
||||
|
||||
[bundles]
|
||||
common = [
|
||||
"hppc",
|
||||
"jsr305",
|
||||
"lang3"
|
||||
]
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.resentclient.oss.eaglercraft.build</groupId>
|
||||
<artifactId>com.resentclient.oss.eaglercraft.build.gradle.plugin</artifactId>
|
||||
<version>0.0.0</version>
|
||||
<packaging>pom</packaging>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.resentclient.oss.eaglercraft.build</groupId>
|
||||
<artifactId>plugin</artifactId>
|
||||
<version>0.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<metadata>
|
||||
<groupId>com.resentclient.oss.eaglercraft.build</groupId>
|
||||
<artifactId>com.resentclient.oss.eaglercraft.build.gradle.plugin</artifactId>
|
||||
<versioning>
|
||||
<latest>0.0.0</latest>
|
||||
<release>0.0.0</release>
|
||||
<versions>
|
||||
<version>0.0.0</version>
|
||||
</versions>
|
||||
<lastUpdated>20250517182704</lastUpdated>
|
||||
</versioning>
|
||||
</metadata>
|
Binary file not shown.
@ -0,0 +1,93 @@
|
||||
{
|
||||
"formatVersion": "1.1",
|
||||
"component": {
|
||||
"group": "com.resentclient.oss.eaglercraft.build",
|
||||
"module": "plugin",
|
||||
"version": "0.0.0",
|
||||
"attributes": {
|
||||
"org.gradle.status": "release"
|
||||
}
|
||||
},
|
||||
"createdBy": {
|
||||
"gradle": {
|
||||
"version": "8.10"
|
||||
}
|
||||
},
|
||||
"variants": [
|
||||
{
|
||||
"name": "apiElements",
|
||||
"attributes": {
|
||||
"org.gradle.category": "library",
|
||||
"org.gradle.dependency.bundling": "external",
|
||||
"org.gradle.jvm.environment": "standard-jvm",
|
||||
"org.gradle.jvm.version": 8,
|
||||
"org.gradle.libraryelements": "jar",
|
||||
"org.gradle.usage": "java-api",
|
||||
"org.jetbrains.kotlin.platform.type": "jvm"
|
||||
},
|
||||
"files": [
|
||||
{
|
||||
"name": "plugin-0.0.0.jar",
|
||||
"url": "plugin-0.0.0.jar",
|
||||
"size": 84888,
|
||||
"sha512": "441fa73bc42f953cef96f58b77a9e1974f41517a19d8dd37818aad73657d4d08a86cbf5cc7a7a5a1d07017845044818a0e45b75c40549b591d418cb88b67ff1e",
|
||||
"sha256": "41f5f930f9bc3547e35ae35599a8d80de3e006fa6de7ebe88430c647f949ada8",
|
||||
"sha1": "a092edfdb05dd70020149fac35ec55886b4aab48",
|
||||
"md5": "f21b11b5c1d7e5120e70b2c98d8a84bf"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "runtimeElements",
|
||||
"attributes": {
|
||||
"org.gradle.category": "library",
|
||||
"org.gradle.dependency.bundling": "external",
|
||||
"org.gradle.jvm.environment": "standard-jvm",
|
||||
"org.gradle.jvm.version": 8,
|
||||
"org.gradle.libraryelements": "jar",
|
||||
"org.gradle.usage": "java-runtime",
|
||||
"org.jetbrains.kotlin.platform.type": "jvm"
|
||||
},
|
||||
"dependencies": [
|
||||
{
|
||||
"group": "com.jcraft",
|
||||
"module": "jzlib",
|
||||
"version": {
|
||||
"requires": "1.1.3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"group": "org.tukaani",
|
||||
"module": "xz",
|
||||
"version": {
|
||||
"requires": "1.10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"group": "org.jetbrains.kotlin",
|
||||
"module": "kotlin-stdlib-jdk8"
|
||||
}
|
||||
],
|
||||
"dependencyConstraints": [
|
||||
{
|
||||
"group": "org.jetbrains.kotlin",
|
||||
"module": "kotlin-stdlib-jdk8",
|
||||
"version": {
|
||||
"requires": "2.1.10"
|
||||
}
|
||||
}
|
||||
],
|
||||
"files": [
|
||||
{
|
||||
"name": "plugin-0.0.0.jar",
|
||||
"url": "plugin-0.0.0.jar",
|
||||
"size": 84888,
|
||||
"sha512": "441fa73bc42f953cef96f58b77a9e1974f41517a19d8dd37818aad73657d4d08a86cbf5cc7a7a5a1d07017845044818a0e45b75c40549b591d418cb88b67ff1e",
|
||||
"sha256": "41f5f930f9bc3547e35ae35599a8d80de3e006fa6de7ebe88430c647f949ada8",
|
||||
"sha1": "a092edfdb05dd70020149fac35ec55886b4aab48",
|
||||
"md5": "f21b11b5c1d7e5120e70b2c98d8a84bf"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<!-- This module was also published with a richer model, Gradle metadata, -->
|
||||
<!-- which should be used instead. Do not delete the following line which -->
|
||||
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
|
||||
<!-- that they should prefer consuming it instead. -->
|
||||
<!-- do_not_remove: published-with-gradle-metadata -->
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.resentclient.oss.eaglercraft.build</groupId>
|
||||
<artifactId>plugin</artifactId>
|
||||
<version>0.0.0</version>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||
<version>2.1.10</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.jcraft</groupId>
|
||||
<artifactId>jzlib</artifactId>
|
||||
<version>1.1.3</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.tukaani</groupId>
|
||||
<artifactId>xz</artifactId>
|
||||
<version>1.10</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<metadata>
|
||||
<groupId>com.resentclient.oss.eaglercraft.build</groupId>
|
||||
<artifactId>plugin</artifactId>
|
||||
<versioning>
|
||||
<latest>0.0.0</latest>
|
||||
<release>0.0.0</release>
|
||||
<versions>
|
||||
<version>0.0.0</version>
|
||||
</versions>
|
||||
<lastUpdated>20250517182708</lastUpdated>
|
||||
</versioning>
|
||||
</metadata>
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
294
gradlew
vendored
294
gradlew
vendored
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,78 +17,111 @@
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
@ -97,87 +130,120 @@ Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
JAVACMD=java
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
@ -1,10 +0,0 @@
|
||||
/*
|
||||
* This file was generated by the Gradle 'init' task.
|
||||
*
|
||||
* The settings file is used to specify which projects to include in your build.
|
||||
*
|
||||
* Detailed information about configuring a multi-project build in Gradle can be found
|
||||
* in the user manual at https://docs.gradle.org/6.0/userguide/multi_project_builds.html
|
||||
*/
|
||||
|
||||
rootProject.name = 'eaglercraft-workspace'
|
22
settings.gradle.kts
Executable file
22
settings.gradle.kts
Executable file
@ -0,0 +1,22 @@
|
||||
import java.io.File
|
||||
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
maven {
|
||||
name = "eagler-teavm"
|
||||
url = uri("https://eaglercraft-teavm-fork.github.io/maven/")
|
||||
}
|
||||
maven {
|
||||
name = "eagler-local"
|
||||
url = uri(File(rootDir, "gradle/local-libs"))
|
||||
}
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "eaglercraft-workspace"
|
||||
|
||||
include("target_lwjgl_desktop")
|
||||
include("target_teavm_javascript")
|
||||
include("target_teavm_wasm_gc")
|
@ -10,7 +10,6 @@ import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.util.IProgressUpdate;
|
||||
import net.minecraft.util.MinecraftError;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
@ -70,11 +69,7 @@ public class LoadingScreenRenderer implements IProgressUpdate {
|
||||
|
||||
private void displayString(String message) {
|
||||
this.currentlyDisplayedText = message;
|
||||
if (!this.mc.running) {
|
||||
if (!this.field_73724_e) {
|
||||
throw new MinecraftError();
|
||||
}
|
||||
} else {
|
||||
if (this.mc.running) {
|
||||
GlStateManager.clear(GL_DEPTH_BUFFER_BIT);
|
||||
GlStateManager.matrixMode(GL_PROJECTION);
|
||||
GlStateManager.loadIdentity();
|
||||
@ -91,11 +86,7 @@ public class LoadingScreenRenderer implements IProgressUpdate {
|
||||
* what is being done currently.
|
||||
*/
|
||||
public void displayLoadingString(String message) {
|
||||
if (!this.mc.running) {
|
||||
if (!this.field_73724_e) {
|
||||
throw new MinecraftError();
|
||||
}
|
||||
} else {
|
||||
if (this.mc.running) {
|
||||
this.systemTime = 0L;
|
||||
this.message = message;
|
||||
this.setLoadingProgress(-1);
|
||||
@ -104,11 +95,7 @@ public class LoadingScreenRenderer implements IProgressUpdate {
|
||||
}
|
||||
|
||||
public void eaglerShow(String line1, String line2) {
|
||||
if (!this.mc.running) {
|
||||
if (!this.field_73724_e) {
|
||||
throw new MinecraftError();
|
||||
}
|
||||
} else {
|
||||
if (this.mc.running) {
|
||||
this.systemTime = 0L;
|
||||
this.currentlyDisplayedText = line1;
|
||||
this.message = line2;
|
||||
@ -126,11 +113,7 @@ public class LoadingScreenRenderer implements IProgressUpdate {
|
||||
* specified amount. Args: loadProgress
|
||||
*/
|
||||
public void setLoadingProgress(int progress) {
|
||||
if (!this.mc.running) {
|
||||
if (!this.field_73724_e) {
|
||||
throw new MinecraftError();
|
||||
}
|
||||
} else {
|
||||
if (this.mc.running) {
|
||||
long i = Minecraft.getSystemTime();
|
||||
if (i - this.systemTime >= 100L) {
|
||||
this.systemTime = i;
|
||||
|
@ -16,7 +16,6 @@ import net.lax1dude.eaglercraft.v1_8.ClientUUIDLoadingCache;
|
||||
import net.lax1dude.eaglercraft.v1_8.Display;
|
||||
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
import net.lax1dude.eaglercraft.v1_8.EagUtils;
|
||||
import net.lax1dude.eaglercraft.v1_8.EaglerXBungeeVersion;
|
||||
import net.lax1dude.eaglercraft.v1_8.HString;
|
||||
import net.lax1dude.eaglercraft.v1_8.IOUtils;
|
||||
import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
@ -34,6 +33,7 @@ import net.lax1dude.eaglercraft.v1_8.futures.Executors;
|
||||
import net.lax1dude.eaglercraft.v1_8.futures.FutureTask;
|
||||
import net.lax1dude.eaglercraft.v1_8.futures.ListenableFuture;
|
||||
import net.lax1dude.eaglercraft.v1_8.futures.ListenableFutureTask;
|
||||
import net.lax1dude.eaglercraft.v1_8.internal.ContextLostError;
|
||||
import net.lax1dude.eaglercraft.v1_8.internal.EnumPlatformType;
|
||||
import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime;
|
||||
import net.lax1dude.eaglercraft.v1_8.internal.PlatformWebRTC;
|
||||
@ -67,6 +67,7 @@ import net.lax1dude.eaglercraft.v1_8.profile.SkinPreviewRenderer;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.AddressResolver;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.EaglercraftNetworkManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.RateLimitTracker;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.client.StateFlags;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.IntegratedServerState;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.SkullCommand;
|
||||
@ -182,7 +183,6 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.FrameTimer;
|
||||
import net.minecraft.util.IThreadListener;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MinecraftError;
|
||||
import net.minecraft.util.MouseHelper;
|
||||
import net.minecraft.util.MovementInputFromOptions;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
@ -384,9 +384,10 @@ public class Minecraft implements IThreadListener {
|
||||
}
|
||||
|
||||
this.displayCrashReport(this.crashReporter);
|
||||
return;
|
||||
}
|
||||
} catch (MinecraftError var12) {
|
||||
// ??
|
||||
} catch (ContextLostError err) {
|
||||
throw err;
|
||||
} catch (ReportedException reportedexception) {
|
||||
this.addGraphicsAndWorldToCrashReport(reportedexception.getCrashReport());
|
||||
logger.fatal("Reported exception thrown!", reportedexception);
|
||||
@ -842,6 +843,8 @@ public class Minecraft implements IThreadListener {
|
||||
this.shutdown();
|
||||
}
|
||||
|
||||
Display.checkContextLost();
|
||||
|
||||
PointerInputAbstraction.runGameLoop();
|
||||
this.gameSettings.touchscreen = PointerInputAbstraction.isTouchMode();
|
||||
|
||||
@ -872,27 +875,25 @@ public class Minecraft implements IThreadListener {
|
||||
this.checkGLError("Pre render");
|
||||
this.mcSoundHandler.setListener(this.thePlayer, this.timer.renderPartialTicks);
|
||||
|
||||
if (!Display.contextLost()) {
|
||||
EaglercraftGPU.optimize();
|
||||
_wglBindFramebuffer(0x8D40, null);
|
||||
GlStateManager.viewport(0, 0, this.displayWidth, this.displayHeight);
|
||||
GlStateManager.clearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
GlStateManager.enableTexture2D();
|
||||
if (this.thePlayer != null && this.thePlayer.isEntityInsideOpaqueBlock()) {
|
||||
this.gameSettings.thirdPersonView = 0;
|
||||
}
|
||||
|
||||
if (!this.skipRenderWorld) {
|
||||
this.entityRenderer.func_181560_a(this.timer.renderPartialTicks, i);
|
||||
}
|
||||
|
||||
this.guiAchievement.updateAchievementWindow();
|
||||
this.touchOverlayRenderer.render(displayWidth, displayHeight, scaledResolution);
|
||||
GlStateManager.popMatrix();
|
||||
EaglercraftGPU.optimize();
|
||||
_wglBindFramebuffer(0x8D40, null);
|
||||
GlStateManager.viewport(0, 0, this.displayWidth, this.displayHeight);
|
||||
GlStateManager.clearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
GlStateManager.enableTexture2D();
|
||||
if (this.thePlayer != null && this.thePlayer.isEntityInsideOpaqueBlock()) {
|
||||
this.gameSettings.thirdPersonView = 0;
|
||||
}
|
||||
|
||||
if (!this.skipRenderWorld) {
|
||||
this.entityRenderer.func_181560_a(this.timer.renderPartialTicks, i);
|
||||
}
|
||||
|
||||
this.guiAchievement.updateAchievementWindow();
|
||||
this.touchOverlayRenderer.render(displayWidth, displayHeight, scaledResolution);
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
this.updateDisplay();
|
||||
this.checkGLError("Post render");
|
||||
|
||||
@ -1220,7 +1221,7 @@ public class Minecraft implements IThreadListener {
|
||||
this.ingameGUI.updateTick();
|
||||
}
|
||||
|
||||
VoiceClientController.tickVoiceClient(this);
|
||||
VoiceClientController.tickVoiceClient();
|
||||
|
||||
this.entityRenderer.getMouseOver(1.0F);
|
||||
if (!this.isGamePaused && this.theWorld != null) {
|
||||
@ -1699,29 +1700,29 @@ public class Minecraft implements IThreadListener {
|
||||
if (bungeeOutdatedMsgTimer > 0) {
|
||||
if (--bungeeOutdatedMsgTimer == 0 && this.thePlayer.sendQueue != null) {
|
||||
String pluginBrand = this.thePlayer.sendQueue.getNetworkManager().getPluginBrand();
|
||||
String pluginVersion = this.thePlayer.sendQueue.getNetworkManager().getPluginVersion();
|
||||
if (pluginBrand != null && pluginVersion != null
|
||||
&& EaglerXBungeeVersion.isUpdateToPluginAvailable(pluginBrand, pluginVersion)) {
|
||||
if (pluginBrand != null && ("EaglercraftXBungee".equals(pluginBrand)
|
||||
|| "EaglercraftXVelocity".equals(pluginBrand))) {
|
||||
String pfx = EnumChatFormatting.GOLD + "[EagX]" + EnumChatFormatting.AQUA;
|
||||
ingameGUI.getChatGUI().printChatMessage(
|
||||
new ChatComponentText(pfx + " ---------------------------------------"));
|
||||
ingameGUI.getChatGUI().printChatMessage(new ChatComponentText(pfx + " This server is running "
|
||||
+ EnumChatFormatting.YELLOW + pluginBrand + EnumChatFormatting.AQUA + ","));
|
||||
ingameGUI.getChatGUI().printChatMessage(
|
||||
new ChatComponentText(pfx + " This server appears to be using version "
|
||||
+ EnumChatFormatting.YELLOW + pluginVersion));
|
||||
new ChatComponentText(pfx + " which has been discontinued by lax1dude."));
|
||||
ingameGUI.getChatGUI().printChatMessage(new ChatComponentText(pfx));
|
||||
ingameGUI.getChatGUI().printChatMessage(
|
||||
new ChatComponentText(pfx + " of the EaglerXBungee plugin which is outdated"));
|
||||
new ChatComponentText(pfx + " If you are the admin of this server, please"));
|
||||
ingameGUI.getChatGUI().printChatMessage(
|
||||
new ChatComponentText(pfx + " upgrade to EaglercraftXServer if you want to"));
|
||||
ingameGUI.getChatGUI().printChatMessage(
|
||||
new ChatComponentText(pfx + " to continue to receive support and bugfixes."));
|
||||
ingameGUI.getChatGUI().printChatMessage(new ChatComponentText(pfx));
|
||||
ingameGUI.getChatGUI()
|
||||
.printChatMessage(new ChatComponentText(pfx + " If you are the admin update to "
|
||||
+ EnumChatFormatting.YELLOW + EaglerXBungeeVersion.getPluginVersion()
|
||||
+ EnumChatFormatting.AQUA + " or newer"));
|
||||
ingameGUI.getChatGUI().printChatMessage(new ChatComponentText(pfx));
|
||||
ingameGUI.getChatGUI().printChatMessage((new ChatComponentText(pfx + " Click: "))
|
||||
.appendSibling((new ChatComponentText("" + EnumChatFormatting.GREEN
|
||||
+ EnumChatFormatting.UNDERLINE + EaglerXBungeeVersion.getPluginButton()))
|
||||
.setChatStyle((new ChatStyle()).setChatClickEvent(
|
||||
new ClickEvent(ClickEvent.Action.EAGLER_PLUGIN_DOWNLOAD,
|
||||
"plugin_download.zip")))));
|
||||
.printChatMessage((new ChatComponentText(pfx + " " + EnumChatFormatting.GREEN
|
||||
+ EnumChatFormatting.UNDERLINE + "https://lax1dude.net/eaglerxserver"))
|
||||
.setChatStyle((new ChatStyle())
|
||||
.setChatClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL,
|
||||
"https://lax1dude.net/eaglerxserver"))));
|
||||
ingameGUI.getChatGUI().printChatMessage(
|
||||
new ChatComponentText(pfx + " ---------------------------------------"));
|
||||
}
|
||||
@ -1877,7 +1878,7 @@ public class Minecraft implements IThreadListener {
|
||||
EaglerProfile.clearServerSkinOverride();
|
||||
PauseMenuCustomizeState.reset();
|
||||
ClientUUIDLoadingCache.flushRequestCache();
|
||||
ClientUUIDLoadingCache.resetFlags();
|
||||
StateFlags.reset();
|
||||
WebViewOverlayController.setPacketSendCallback(null);
|
||||
|
||||
this.guiAchievement.clearAchievements();
|
||||
@ -2068,7 +2069,7 @@ public class Minecraft implements IThreadListener {
|
||||
object = Items.spawn_egg;
|
||||
i = EntityList.getEntityID(this.objectMouseOver.entityHit);
|
||||
flag1 = true;
|
||||
if (!EntityList.entityEggs.containsKey(Integer.valueOf(i))) {
|
||||
if (!EntityList.entityEggs.containsKey(i)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ import com.google.common.base.Splitter;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
import net.lax1dude.eaglercraft.v1_8.EaglerXBungeeVersion;
|
||||
import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
import net.lax1dude.eaglercraft.v1_8.Mouse;
|
||||
import net.lax1dude.eaglercraft.v1_8.cookie.ServerCookieDataStore;
|
||||
@ -358,7 +357,7 @@ public class GuiMultiplayer extends GuiScreen implements GuiYesNoCallback {
|
||||
GlStateManager.scale(0.75f, 0.75f, 0.75f);
|
||||
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
|
||||
String text = EaglerXBungeeVersion.getPluginButton();
|
||||
String text = "Download EaglerXServer";
|
||||
int w = mc.fontRendererObj.getStringWidth(text);
|
||||
boolean hover = xx > width - 5 - (w + 5) * 3 / 4 && yy > 1 && xx < width - 2 && yy < 12;
|
||||
if (hover) {
|
||||
@ -428,12 +427,12 @@ public class GuiMultiplayer extends GuiScreen implements GuiYesNoCallback {
|
||||
relaysButton.mouseClicked(parInt1, parInt2, parInt3);
|
||||
super.mouseClicked(parInt1, parInt2, parInt3);
|
||||
this.serverListSelector.mouseClicked(parInt1, parInt2, parInt3);
|
||||
String text = EaglerXBungeeVersion.getPluginButton();
|
||||
String text = "Download EaglerXServer";
|
||||
int w = mc.fontRendererObj.getStringWidth(text);
|
||||
if (parInt1 > width - 5 - (w + 5) * 3 / 4 && parInt2 > 1 && parInt1 < width - 2 && parInt2 < 12) {
|
||||
this.mc.getSoundHandler()
|
||||
.playSound(PositionedSoundRecord.create(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
EaglerXBungeeVersion.startPluginDownload();
|
||||
EagRuntime.openLink("https://lax1dude.net/eaglerxserver");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,6 @@ import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
import net.lax1dude.eaglercraft.v1_8.EaglerXBungeeVersion;
|
||||
import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
import net.lax1dude.eaglercraft.v1_8.Mouse;
|
||||
import net.lax1dude.eaglercraft.v1_8.PauseMenuCustomizeState;
|
||||
@ -424,13 +423,6 @@ public abstract class GuiScreen extends Gui implements GuiYesNoCallback {
|
||||
* GuiTwitchUserMode(this.mc.getTwitchStream(), chatuserinfo)); } else { }
|
||||
*/
|
||||
LOGGER.error("Tried to handle twitch user but couldn\'t find them!");
|
||||
} else if (clickevent.getAction() == ClickEvent.Action.EAGLER_PLUGIN_DOWNLOAD) {
|
||||
if (EaglerXBungeeVersion.pluginFileEPK.equals(clickevent.getValue())) {
|
||||
EaglerXBungeeVersion.startPluginDownload();
|
||||
} else {
|
||||
LOGGER.error("Invalid plugin download from EPK was blocked: {}",
|
||||
EaglerXBungeeVersion.pluginFileEPK);
|
||||
}
|
||||
} else {
|
||||
LOGGER.error("Don\'t know how to handle " + clickevent);
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ public class PlayerMenuObject implements ISpectatorMenuObject {
|
||||
|
||||
public void func_178663_a(float alpha, int parInt1) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(
|
||||
Minecraft.getMinecraft().getNetHandler().getSkinCache().getSkin(profile).getResourceLocation());
|
||||
Minecraft.getMinecraft().getNetHandler().getTextureCache().getPlayerSkin(profile).getLocation());
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, (float) parInt1 / 255.0F);
|
||||
Gui.drawScaledCustomSizeModalRect(2, 2, 8.0F, 8.0F, 8, 8, 12, 12, 64.0F, 64.0F);
|
||||
Gui.drawScaledCustomSizeModalRect(2, 2, 40.0F, 8.0F, 8, 8, 12, 12, 64.0F, 64.0F);
|
||||
|
@ -1,6 +1,5 @@
|
||||
package net.minecraft.client.multiplayer;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
@ -11,22 +10,15 @@ import net.lax1dude.eaglercraft.v1_8.internal.IWebSocketFrame;
|
||||
import net.lax1dude.eaglercraft.v1_8.internal.PlatformNetworking;
|
||||
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
import net.lax1dude.eaglercraft.v1_8.profile.EaglerProfile;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.AddressResolver;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.ConnectionHandshake;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.EaglercraftNetworkManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.RateLimitTracker;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.WebSocketNetworkManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePluginMessageConstants;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePluginMessageProtocol;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.client.GameProtocolMessageController;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.handshake.HandshakerHandler;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiDisconnected;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.network.NetHandlerPlayClient;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.network.EnumConnectionState;
|
||||
import net.minecraft.network.play.client.C17PacketCustomPayload;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
|
||||
/**+
|
||||
@ -52,13 +44,12 @@ import net.minecraft.util.ChatComponentText;
|
||||
public class GuiConnecting extends GuiScreen {
|
||||
private static final Logger logger = LogManager.getLogger();
|
||||
private IWebSocketClient webSocket;
|
||||
private EaglercraftNetworkManager networkManager;
|
||||
private HandshakerHandler handshaker;
|
||||
private String currentAddress;
|
||||
private String currentPassword;
|
||||
private boolean allowPlaintext;
|
||||
private boolean allowCookies;
|
||||
private boolean cancel;
|
||||
private boolean hasOpened;
|
||||
private final GuiScreen previousGuiScreen;
|
||||
private int timer = 0;
|
||||
|
||||
@ -149,10 +140,13 @@ public class GuiConnecting extends GuiScreen {
|
||||
new ChatComponentText("Could not open WebSocket to \"" + currentAddress + "\"!")));
|
||||
}
|
||||
} else {
|
||||
if (webSocket.getState() == EnumEaglerConnectionState.CONNECTED) {
|
||||
if (!hasOpened) {
|
||||
hasOpened = true;
|
||||
EnumEaglerConnectionState connState = webSocket.getState();
|
||||
if (connState == EnumEaglerConnectionState.CONNECTED) {
|
||||
if (handshaker == null) {
|
||||
this.mc.getSession().reset();
|
||||
|
||||
logger.info("Logging in: {}", currentAddress);
|
||||
|
||||
byte[] cookieData = null;
|
||||
if (allowCookies) {
|
||||
ServerCookieDataStore.ServerCookie cookie = ServerCookieDataStore
|
||||
@ -161,61 +155,15 @@ public class GuiConnecting extends GuiScreen {
|
||||
cookieData = cookie.cookie;
|
||||
}
|
||||
}
|
||||
if (ConnectionHandshake.attemptHandshake(this.mc, webSocket, this, previousGuiScreen,
|
||||
currentPassword, allowPlaintext, allowCookies, cookieData)) {
|
||||
logger.info("Handshake Success");
|
||||
webSocket.setEnableStringFrames(false);
|
||||
webSocket.clearStringFrames();
|
||||
this.networkManager = new WebSocketNetworkManager(webSocket);
|
||||
this.networkManager.setPluginInfo(ConnectionHandshake.pluginBrand,
|
||||
ConnectionHandshake.pluginVersion);
|
||||
mc.bungeeOutdatedMsgTimer = 80;
|
||||
mc.clearTitles();
|
||||
this.networkManager.setConnectionState(EnumConnectionState.PLAY);
|
||||
NetHandlerPlayClient netHandler = new NetHandlerPlayClient(this.mc, previousGuiScreen,
|
||||
this.networkManager, this.mc.getSession().getProfile());
|
||||
this.networkManager.setNetHandler(netHandler);
|
||||
netHandler.setEaglerMessageController(new GameProtocolMessageController(
|
||||
GamePluginMessageProtocol.getByVersion(ConnectionHandshake.protocolVersion),
|
||||
GamePluginMessageConstants.CLIENT_TO_SERVER,
|
||||
GameProtocolMessageController
|
||||
.createClientHandler(ConnectionHandshake.protocolVersion, netHandler),
|
||||
(ch, msg) -> netHandler.addToSendQueue(new C17PacketCustomPayload(ch, msg))));
|
||||
} else {
|
||||
if (mc.currentScreen == this) {
|
||||
checkRatelimit();
|
||||
logger.info("Handshake Failure");
|
||||
mc.getSession().reset();
|
||||
mc.displayGuiScreen(
|
||||
new GuiDisconnected(previousGuiScreen, "connect.failed", new ChatComponentText(
|
||||
"Handshake Failure\n\nAre you sure this is an eagler 1.8 server?")));
|
||||
}
|
||||
webSocket.close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (this.networkManager != null) {
|
||||
try {
|
||||
this.networkManager.processReceivedPackets();
|
||||
} catch (IOException ex) {
|
||||
}
|
||||
|
||||
handshaker = new HandshakerHandler(this, webSocket, EaglerProfile.getName(), currentPassword,
|
||||
allowPlaintext, allowCookies, cookieData);
|
||||
}
|
||||
handshaker.tick();
|
||||
} else {
|
||||
if (webSocket.getState() == EnumEaglerConnectionState.FAILED) {
|
||||
if (!hasOpened) {
|
||||
mc.getSession().reset();
|
||||
checkRatelimit();
|
||||
if (mc.currentScreen == this) {
|
||||
if (RateLimitTracker.isProbablyLockedOut(currentAddress)) {
|
||||
mc.displayGuiScreen(GuiDisconnected.createRateLimitKick(previousGuiScreen));
|
||||
} else {
|
||||
mc.displayGuiScreen(new GuiDisconnected(previousGuiScreen, "connect.failed",
|
||||
new ChatComponentText("Connection Refused")));
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (this.networkManager != null && this.networkManager.checkDisconnected()) {
|
||||
if (handshaker != null) {
|
||||
handshaker.tick();
|
||||
if (connState == EnumEaglerConnectionState.FAILED) {
|
||||
this.mc.getSession().reset();
|
||||
checkRatelimit();
|
||||
if (mc.currentScreen == this) {
|
||||
@ -267,12 +215,7 @@ public class GuiConnecting extends GuiScreen {
|
||||
protected void actionPerformed(GuiButton parGuiButton) {
|
||||
if (parGuiButton.id == 0) {
|
||||
this.cancel = true;
|
||||
if (this.networkManager != null) {
|
||||
this.networkManager.closeChannel(new ChatComponentText("Aborted"));
|
||||
} else if (this.webSocket != null) {
|
||||
this.webSocket.close();
|
||||
}
|
||||
|
||||
this.webSocket.close();
|
||||
this.mc.displayGuiScreen(this.previousGuiScreen);
|
||||
}
|
||||
|
||||
@ -284,7 +227,7 @@ public class GuiConnecting extends GuiScreen {
|
||||
*/
|
||||
public void drawScreen(int i, int j, float f) {
|
||||
this.drawDefaultBackground();
|
||||
if (this.networkManager == null || !this.networkManager.isChannelOpen()) {
|
||||
if (this.handshaker == null) {
|
||||
this.drawCenteredString(this.fontRendererObj, I18n.format("connect.connecting", new Object[0]),
|
||||
this.width / 2, this.height / 2 - 50, 16777215);
|
||||
} else {
|
||||
@ -319,4 +262,13 @@ public class GuiConnecting extends GuiScreen {
|
||||
public boolean canCloseGui() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static Minecraft getMC(GuiConnecting gui) {
|
||||
return gui.mc;
|
||||
}
|
||||
|
||||
public static GuiScreen getPrevScreen(GuiConnecting gui) {
|
||||
return gui.previousGuiScreen;
|
||||
}
|
||||
|
||||
}
|
@ -313,8 +313,7 @@ public class PlayerControllerMP {
|
||||
this.netClientHandler.getNetworkManager()
|
||||
.closeChannel(new ChatComponentText("Exception thrown: " + ex.toString()));
|
||||
}
|
||||
this.netClientHandler.getSkinCache().flush();
|
||||
this.netClientHandler.getCapeCache().flush();
|
||||
this.netClientHandler.getTextureCache().runTick();
|
||||
this.netClientHandler.getNotifManager().runTick();
|
||||
ClientUUIDLoadingCache.update();
|
||||
} else {
|
||||
|
@ -14,11 +14,15 @@ import com.google.common.collect.Maps;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.netty.Unpooled;
|
||||
import net.lax1dude.eaglercraft.v1_8.notifications.ServerNotificationManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.profile.ServerCapeCache;
|
||||
import net.lax1dude.eaglercraft.v1_8.profile.ServerSkinCache;
|
||||
import net.lax1dude.eaglercraft.v1_8.skin_cache.ServerTextureCache;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.EaglercraftNetworkManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePluginMessageConstants;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePluginMessageProtocol;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.client.GameProtocolMessageController;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.client.ClientMessageHandler;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.handshake.StandardCaps;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.message.InjectedMessageController;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.message.LegacyMessageController;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.message.MessageController;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.lan.LANClientNetworkManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.socket.ClientIntegratedServerNetworkManager;
|
||||
@ -257,26 +261,37 @@ public class NetHandlerPlayClient implements INetHandlerPlayClient {
|
||||
* particlespawn offset and velocity
|
||||
*/
|
||||
private final EaglercraftRandom avRandomizer = new EaglercraftRandom();
|
||||
private final ServerSkinCache skinCache;
|
||||
private final ServerCapeCache capeCache;
|
||||
private final ServerTextureCache textureCache;
|
||||
private final ServerNotificationManager notifManager;
|
||||
public boolean currentFNAWSkinAllowedState = true;
|
||||
public boolean currentFNAWSkinForcedState = true;
|
||||
private GameProtocolMessageController eaglerMessageController = null;
|
||||
public boolean hasRequestedServerInfo = false;
|
||||
private final MessageController eaglerMessageController;
|
||||
public byte[] cachedServerInfoHash = null;
|
||||
public byte[] cachedServerInfoData = null;
|
||||
public boolean allowedDisplayWebview = false;
|
||||
public boolean allowedDisplayWebviewYes = false;
|
||||
|
||||
public NetHandlerPlayClient(Minecraft mcIn, GuiScreen parGuiScreen, EaglercraftNetworkManager parNetworkManager,
|
||||
GameProfile parGameProfile) {
|
||||
GameProfile parGameProfile, GamePluginMessageProtocol eaglerProtocol) {
|
||||
this.gameController = mcIn;
|
||||
this.guiScreenServer = parGuiScreen;
|
||||
this.netManager = parNetworkManager;
|
||||
this.netManager.setNetHandler(this);
|
||||
this.profile = parGameProfile;
|
||||
this.skinCache = new ServerSkinCache(this, mcIn.getTextureManager());
|
||||
this.capeCache = new ServerCapeCache(this, mcIn.getTextureManager());
|
||||
this.notifManager = new ServerNotificationManager();
|
||||
this.isIntegratedServer = (parNetworkManager instanceof ClientIntegratedServerNetworkManager)
|
||||
|| (parNetworkManager instanceof LANClientNetworkManager);
|
||||
ClientMessageHandler handler = ClientMessageHandler.createClientHandler(eaglerProtocol.ver, this);
|
||||
if (eaglerProtocol.ver >= 5) {
|
||||
this.eaglerMessageController = new InjectedMessageController(eaglerProtocol, handler,
|
||||
GamePluginMessageConstants.CLIENT_TO_SERVER, parNetworkManager::injectRawFrame);
|
||||
parNetworkManager.setInjectedMessageController((InjectedMessageController) eaglerMessageController);
|
||||
} else {
|
||||
this.eaglerMessageController = new LegacyMessageController(eaglerProtocol, handler,
|
||||
GamePluginMessageConstants.CLIENT_TO_SERVER,
|
||||
(ch, msg) -> addToSendQueue(new C17PacketCustomPayload(ch, msg)));
|
||||
}
|
||||
this.textureCache = ServerTextureCache.create(this, mcIn.getTextureManager());
|
||||
this.notifManager = new ServerNotificationManager(mcIn.getTextureManager());
|
||||
}
|
||||
|
||||
/**+
|
||||
@ -285,42 +300,28 @@ public class NetHandlerPlayClient implements INetHandlerPlayClient {
|
||||
*/
|
||||
public void cleanup() {
|
||||
this.clientWorldController = null;
|
||||
this.skinCache.destroy();
|
||||
this.capeCache.destroy();
|
||||
this.textureCache.destroy();
|
||||
this.notifManager.destroy();
|
||||
}
|
||||
|
||||
public ServerSkinCache getSkinCache() {
|
||||
return this.skinCache;
|
||||
}
|
||||
|
||||
public ServerCapeCache getCapeCache() {
|
||||
return this.capeCache;
|
||||
public ServerTextureCache getTextureCache() {
|
||||
return this.textureCache;
|
||||
}
|
||||
|
||||
public ServerNotificationManager getNotifManager() {
|
||||
return this.notifManager;
|
||||
}
|
||||
|
||||
public GameProtocolMessageController getEaglerMessageController() {
|
||||
public MessageController getEaglerMessageController() {
|
||||
return eaglerMessageController;
|
||||
}
|
||||
|
||||
public void setEaglerMessageController(GameProtocolMessageController eaglerMessageController) {
|
||||
this.eaglerMessageController = eaglerMessageController;
|
||||
}
|
||||
|
||||
public GamePluginMessageProtocol getEaglerMessageProtocol() {
|
||||
return eaglerMessageController != null ? eaglerMessageController.protocol : null;
|
||||
return eaglerMessageController != null ? eaglerMessageController.getProtocol() : null;
|
||||
}
|
||||
|
||||
public void sendEaglerMessage(GameMessagePacket packet) {
|
||||
try {
|
||||
eaglerMessageController.sendPacket(packet);
|
||||
} catch (IOException e) {
|
||||
logger.error("Failed to send eaglercraft plugin message packet: " + packet);
|
||||
logger.error(e);
|
||||
}
|
||||
eaglerMessageController.sendPacket(packet);
|
||||
}
|
||||
|
||||
public boolean webViewSendHandler(GameMessagePacket pkt) {
|
||||
@ -331,7 +332,7 @@ public class NetHandlerPlayClient implements INetHandlerPlayClient {
|
||||
logger.error("WebView sent message on a dead handler!");
|
||||
return false;
|
||||
}
|
||||
if (eaglerMessageController.protocol.ver >= 4) {
|
||||
if (eaglerMessageController.getProtocol().ver >= 4) {
|
||||
sendEaglerMessage(pkt);
|
||||
return true;
|
||||
} else {
|
||||
@ -361,9 +362,18 @@ public class NetHandlerPlayClient implements INetHandlerPlayClient {
|
||||
this.netManager.sendPacket(new C17PacketCustomPayload("MC|Brand",
|
||||
(new PacketBuffer(Unpooled.buffer())).writeString(ClientBrandRetriever.getClientModName())));
|
||||
if (VoiceClientController.isClientSupported()) {
|
||||
VoiceClientController.initializeVoiceClient(this::sendEaglerMessage, eaglerMessageController.protocol.ver);
|
||||
if (netManager.getServerCapabilities().hasCapability(StandardCaps.VOICE, 0)) {
|
||||
VoiceClientController.initializeVoiceClient(this::sendEaglerMessage,
|
||||
eaglerMessageController.getProtocol().ver);
|
||||
} else {
|
||||
VoiceClientController.initializeVoiceClient(null, -1);
|
||||
}
|
||||
}
|
||||
if (netManager.getServerCapabilities().hasCapability(StandardCaps.WEBVIEW, 0)) {
|
||||
WebViewOverlayController.setPacketSendCallback(this::webViewSendHandler);
|
||||
} else {
|
||||
WebViewOverlayController.setPacketSendCallback(null);
|
||||
}
|
||||
WebViewOverlayController.setPacketSendCallback(this::webViewSendHandler);
|
||||
}
|
||||
|
||||
/**+
|
||||
@ -1466,8 +1476,7 @@ public class NetHandlerPlayClient implements INetHandlerPlayClient {
|
||||
if (packetIn.func_179768_b() == S38PacketPlayerListItem.Action.REMOVE_PLAYER) {
|
||||
EaglercraftUUID uuid = s38packetplayerlistitem$addplayerdata.getProfile().getId();
|
||||
this.playerInfoMap.remove(uuid);
|
||||
this.skinCache.evictSkin(uuid);
|
||||
this.capeCache.evictCape(uuid);
|
||||
this.textureCache.evictPlayer(uuid);
|
||||
ClientUUIDLoadingCache.evict(uuid);
|
||||
} else {
|
||||
NetworkPlayerInfo networkplayerinfo = (NetworkPlayerInfo) this.playerInfoMap
|
||||
@ -1636,9 +1645,10 @@ public class NetHandlerPlayClient implements INetHandlerPlayClient {
|
||||
this.gameController
|
||||
.displayGuiScreen(new GuiScreenBook(this.gameController.thePlayer, itemstack, false));
|
||||
}
|
||||
} else {
|
||||
} else if (eaglerMessageController instanceof LegacyMessageController) {
|
||||
try {
|
||||
eaglerMessageController.handlePacket(packetIn.getChannelName(), packetIn.getBufferData());
|
||||
((LegacyMessageController) eaglerMessageController).handlePacket(packetIn.getChannelName(),
|
||||
packetIn.getBufferData());
|
||||
} catch (IOException e) {
|
||||
logger.error("Couldn't read \"{}\" packet as an eaglercraft plugin message!",
|
||||
packetIn.getChannelName());
|
||||
|
@ -85,21 +85,19 @@ public class NetworkPlayerInfo {
|
||||
}
|
||||
|
||||
public String getSkinType() {
|
||||
return Minecraft.getMinecraft().getNetHandler().getSkinCache().getSkin(this.gameProfile)
|
||||
.getSkinModel().profileSkinType;
|
||||
return getEaglerSkinModel().profileSkinType;
|
||||
}
|
||||
|
||||
public SkinModel getEaglerSkinModel() {
|
||||
return Minecraft.getMinecraft().getNetHandler().getSkinCache().getSkin(this.gameProfile).getSkinModel();
|
||||
return Minecraft.getMinecraft().getNetHandler().getTextureCache().getPlayerSkin(this.gameProfile).getModel();
|
||||
}
|
||||
|
||||
public ResourceLocation getLocationSkin() {
|
||||
return Minecraft.getMinecraft().getNetHandler().getSkinCache().getSkin(this.gameProfile).getResourceLocation();
|
||||
return Minecraft.getMinecraft().getNetHandler().getTextureCache().getPlayerSkin(this.gameProfile).getLocation();
|
||||
}
|
||||
|
||||
public ResourceLocation getLocationCape() {
|
||||
return Minecraft.getMinecraft().getNetHandler().getCapeCache().getCape(this.gameProfile.getId())
|
||||
.getResourceLocation();
|
||||
return Minecraft.getMinecraft().getNetHandler().getTextureCache().getPlayerCape(this.gameProfile);
|
||||
}
|
||||
|
||||
public ScorePlayerTeam getPlayerTeam() {
|
||||
|
@ -4,7 +4,6 @@ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.BlockVertexIDs;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockLiquid;
|
||||
import net.minecraft.block.material.Material;
|
||||
@ -56,7 +55,7 @@ public class BlockFluidRenderer {
|
||||
WorldRenderer worldRendererIn) {
|
||||
BlockPos tmp = new BlockPos(0, 0, 0);
|
||||
boolean deferred = DeferredStateManager.isDeferredRenderer();
|
||||
boolean isDynamicLights = deferred || DynamicLightsStateManager.isDynamicLightsRender();
|
||||
boolean isDynamicLights = deferred;// || DynamicLightsStateManager.isDynamicLightsRender();
|
||||
BlockLiquid blockliquid = (BlockLiquid) blockStateIn.getBlock();
|
||||
boolean lava = blockliquid.getMaterial() == Material.lava;
|
||||
boolean realistic = !lava && DeferredStateManager.isRenderingRealisticWater();
|
||||
|
@ -7,7 +7,6 @@ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.VertexMarkerState;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@ -229,7 +228,7 @@ public class BlockModelRenderer {
|
||||
private void renderModelAmbientOcclusionQuads(IBlockAccess blockAccessIn, IBlockState blockStateIn,
|
||||
BlockPos blockPosIn, WorldRenderer worldRendererIn, List<BakedQuad> listQuadsIn, RenderEnv renderenv) {
|
||||
boolean isDeferred = DeferredStateManager.isDeferredRenderer();
|
||||
boolean isDynamicLights = isDeferred || DynamicLightsStateManager.isDynamicLightsRender();
|
||||
boolean isDynamicLights = isDeferred;// || DynamicLightsStateManager.isDynamicLightsRender();
|
||||
float[] quadBounds = renderenv.getQuadBounds();
|
||||
BitSet boundsFlags = renderenv.getBoundsFlags();
|
||||
BlockModelRenderer.AmbientOcclusionFace aoFaceIn = renderenv.getAoFace();
|
||||
@ -368,7 +367,7 @@ public class BlockModelRenderer {
|
||||
EnumFacing faceIn, int brightnessIn, boolean ownBrightness, WorldRenderer worldRendererIn,
|
||||
List<BakedQuad> listQuadsIn, RenderEnv renderenv) {
|
||||
boolean isDeferred = DeferredStateManager.isDeferredRenderer();
|
||||
boolean isDynamicLights = isDeferred || DynamicLightsStateManager.isDynamicLightsRender();
|
||||
boolean isDynamicLights = isDeferred;// || DynamicLightsStateManager.isDynamicLightsRender();
|
||||
BitSet boundsFlags = renderenv.getBoundsFlags();
|
||||
float[] quadBounds = renderenv.getQuadBounds();
|
||||
double d0 = (double) blockPosIn.getX();
|
||||
|
@ -1665,9 +1665,10 @@ public class RenderGlobal implements IWorldAccess, IResourceManagerReloadListene
|
||||
this.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
this.preRenderDamagedBlocks();
|
||||
worldRendererIn.begin(7,
|
||||
(DeferredStateManager.isDeferredRenderer() || DynamicLightsStateManager.isDynamicLightsRender())
|
||||
? VertexFormat.BLOCK_SHADERS
|
||||
: DefaultVertexFormats.BLOCK);
|
||||
(DeferredStateManager
|
||||
.isDeferredRenderer() /* || DynamicLightsStateManager.isDynamicLightsRender() */)
|
||||
? VertexFormat.BLOCK_SHADERS
|
||||
: DefaultVertexFormats.BLOCK);
|
||||
worldRendererIn.setTranslation(-d0, -d1, -d2);
|
||||
worldRendererIn.markDirty();
|
||||
Iterator iterator = this.damagedBlocks.values().iterator();
|
||||
|
@ -10,7 +10,6 @@ import com.google.common.collect.Sets;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.VertexFormat;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@ -245,7 +244,7 @@ public class RenderChunk {
|
||||
|
||||
private void preRenderBlocks(WorldRenderer worldRendererIn, BlockPos pos) {
|
||||
worldRendererIn.begin(7,
|
||||
(DeferredStateManager.isDeferredRenderer() || DynamicLightsStateManager.isDynamicLightsRender())
|
||||
(DeferredStateManager.isDeferredRenderer() /* || DynamicLightsStateManager.isDynamicLightsRender() */)
|
||||
? VertexFormat.BLOCK_SHADERS
|
||||
: DefaultVertexFormats.BLOCK);
|
||||
worldRendererIn.setTranslation((double) (-pos.getX()), (double) (-pos.getY()), (double) (-pos.getZ()));
|
||||
|
@ -67,10 +67,9 @@ public class RenderFallingBlock extends Render<EntityFallingBlock> {
|
||||
GlStateManager.disableLighting();
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||
worldrenderer.begin(7,
|
||||
(DeferredStateManager.isDeferredRenderer()
|
||||
|| DynamicLightsStateManager.isDynamicLightsRender()) ? VertexFormat.BLOCK_SHADERS
|
||||
: DefaultVertexFormats.BLOCK);
|
||||
worldrenderer.begin(7, (DeferredStateManager.isDeferredRenderer()
|
||||
/* || DynamicLightsStateManager.isDynamicLightsRender() */) ? VertexFormat.BLOCK_SHADERS
|
||||
: DefaultVertexFormats.BLOCK);
|
||||
int i = blockpos.getX();
|
||||
int j = blockpos.getY();
|
||||
int k = blockpos.getZ();
|
||||
|
@ -88,7 +88,7 @@ public class TileEntitySkullRenderer extends TileEntitySpecialRenderer<TileEntit
|
||||
if (parGameProfile != null && parGameProfile.getId() != null) {
|
||||
NetHandlerPlayClient netHandler = Minecraft.getMinecraft().getNetHandler();
|
||||
if (netHandler != null) {
|
||||
resourcelocation = netHandler.getSkinCache().getSkin(parGameProfile).getResourceLocation();
|
||||
resourcelocation = netHandler.getTextureCache().getPlayerSkin(parGameProfile).getLocation();
|
||||
}
|
||||
}
|
||||
this.bindTexture(resourcelocation);
|
||||
|
@ -1,11 +1,10 @@
|
||||
package net.minecraft.entity;
|
||||
|
||||
import com.carrotsearch.hppc.IntArrayList;
|
||||
import com.carrotsearch.hppc.IntObjectHashMap;
|
||||
import com.carrotsearch.hppc.IntObjectMap;
|
||||
import com.carrotsearch.hppc.ObjectContainer;
|
||||
import com.carrotsearch.hppc.cursors.IntObjectCursor;
|
||||
import com.carrotsearch.hppc.cursors.ObjectCursor;
|
||||
import com.carrotsearch.hppc.procedures.IntObjectProcedure;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Predicates;
|
||||
|
||||
@ -502,25 +501,22 @@ public abstract class EntityLivingBase extends Entity {
|
||||
}
|
||||
|
||||
protected void updatePotionEffects() {
|
||||
IntArrayList deadPotionEffects = null;
|
||||
|
||||
for (IntObjectCursor<PotionEffect> cur : this.activePotionsMap) {
|
||||
int integer = cur.key;
|
||||
PotionEffect potioneffect = cur.value;
|
||||
if (!potioneffect.onUpdate(this)) {
|
||||
if (!this.worldObj.isRemote) {
|
||||
if (deadPotionEffects == null)
|
||||
deadPotionEffects = new IntArrayList(4);
|
||||
deadPotionEffects.add(integer);
|
||||
if (!this.worldObj.isRemote) {
|
||||
this.activePotionsMap.removeAll((integer, potioneffect) -> {
|
||||
if (!potioneffect.onUpdate(this)) {
|
||||
this.onFinishedPotionEffect(potioneffect);
|
||||
return true;
|
||||
} else if (potioneffect.getDuration() % 600 == 0) {
|
||||
this.onChangedPotionEffect(potioneffect, false);
|
||||
}
|
||||
} else if (potioneffect.getDuration() % 600 == 0) {
|
||||
this.onChangedPotionEffect(potioneffect, false);
|
||||
}
|
||||
}
|
||||
|
||||
if (deadPotionEffects != null) {
|
||||
this.activePotionsMap.removeAll(deadPotionEffects);
|
||||
return false;
|
||||
});
|
||||
} else {
|
||||
this.activePotionsMap.forEach((IntObjectProcedure<PotionEffect>) (integer, potioneffect) -> {
|
||||
if (potioneffect.onUpdate(this) && potioneffect.getDuration() % 600 == 0) {
|
||||
this.onChangedPotionEffect(potioneffect, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (this.potionsNeedUpdate) {
|
||||
|
@ -10,6 +10,8 @@ import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Sets;
|
||||
import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile;
|
||||
import net.lax1dude.eaglercraft.v1_8.netty.Unpooled;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.server.skins.PlayerTextureData;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
@ -176,6 +178,7 @@ public class EntityPlayerMP extends EntityPlayer implements ICrafting {
|
||||
public int ping;
|
||||
public boolean playerConqueredTheEnd;
|
||||
public byte[] updateCertificate = null;
|
||||
public PlayerTextureData textureData = null;
|
||||
public EaglercraftUUID clientBrandUUID = null;
|
||||
|
||||
public EntityPlayerMP(MinecraftServer server, WorldServer worldIn, GameProfile profile,
|
||||
|
@ -85,7 +85,7 @@ public class ClickEvent {
|
||||
public static enum Action {
|
||||
OPEN_URL("open_url", true), OPEN_FILE("open_file", false), RUN_COMMAND("run_command", true),
|
||||
TWITCH_USER_INFO("twitch_user_info", false), SUGGEST_COMMAND("suggest_command", true),
|
||||
CHANGE_PAGE("change_page", true), EAGLER_PLUGIN_DOWNLOAD("eagler_plugin_download", true);
|
||||
CHANGE_PAGE("change_page", true);
|
||||
|
||||
private static final Map<String, ClickEvent.Action> nameMapping = Maps.newHashMap();
|
||||
private final boolean allowedInChat;
|
||||
|
@ -5,8 +5,12 @@ import com.carrotsearch.hppc.IntShortMap;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.primitives.Doubles;
|
||||
import com.google.common.primitives.Floats;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePluginMessageConstants;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePluginMessageProtocol;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.client.GameProtocolMessageController;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.message.InjectedMessageController;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.message.LegacyMessageController;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.message.MessageController;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketUpdateCertEAG;
|
||||
|
||||
@ -75,6 +79,7 @@ import net.minecraft.network.play.server.S23PacketBlockChange;
|
||||
import net.minecraft.network.play.server.S2FPacketSetSlot;
|
||||
import net.minecraft.network.play.server.S32PacketConfirmTransaction;
|
||||
import net.minecraft.network.play.server.S3APacketTabComplete;
|
||||
import net.minecraft.network.play.server.S3FPacketCustomPayload;
|
||||
import net.minecraft.network.play.server.S40PacketDisconnect;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.stats.AchievementList;
|
||||
@ -93,6 +98,7 @@ import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.ReportedException;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.server.socket.IntegratedServerPlayerNetworkManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.server.socket.protocol.ServerMessageHandler;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
@ -141,36 +147,41 @@ public class NetHandlerPlayServer implements INetHandlerPlayServer, ITickable {
|
||||
private double lastPosZ;
|
||||
private boolean hasMoved = true;
|
||||
private boolean hasDisconnected = false;
|
||||
private GameProtocolMessageController eaglerMessageController = null;
|
||||
private MessageController eaglerMessageController = null;
|
||||
|
||||
public NetHandlerPlayServer(MinecraftServer server, IntegratedServerPlayerNetworkManager networkManagerIn,
|
||||
EntityPlayerMP playerIn) {
|
||||
EntityPlayerMP playerIn, GamePluginMessageProtocol eaglerProtocol) {
|
||||
this.serverController = server;
|
||||
this.netManager = networkManagerIn;
|
||||
networkManagerIn.setNetHandler(this);
|
||||
this.playerEntity = playerIn;
|
||||
playerIn.playerNetServerHandler = this;
|
||||
ServerMessageHandler handler = ServerMessageHandler.createServerHandler(eaglerProtocol.ver, this);
|
||||
if (eaglerProtocol.ver >= 5) {
|
||||
this.eaglerMessageController = new InjectedMessageController(eaglerProtocol, handler,
|
||||
GamePluginMessageConstants.SERVER_TO_CLIENT, networkManagerIn::injectRawFrame);
|
||||
networkManagerIn.setInjectedMessageController((InjectedMessageController) eaglerMessageController);
|
||||
} else {
|
||||
this.eaglerMessageController = new LegacyMessageController(eaglerProtocol, handler,
|
||||
GamePluginMessageConstants.SERVER_TO_CLIENT,
|
||||
(ch, msg) -> sendPacket(new S3FPacketCustomPayload(ch, msg)));
|
||||
}
|
||||
}
|
||||
|
||||
public GameProtocolMessageController getEaglerMessageController() {
|
||||
public MessageController getEaglerMessageController() {
|
||||
return eaglerMessageController;
|
||||
}
|
||||
|
||||
public void setEaglerMessageController(GameProtocolMessageController eaglerMessageController) {
|
||||
public void setEaglerMessageController(MessageController eaglerMessageController) {
|
||||
this.eaglerMessageController = eaglerMessageController;
|
||||
}
|
||||
|
||||
public GamePluginMessageProtocol getEaglerMessageProtocol() {
|
||||
return eaglerMessageController != null ? eaglerMessageController.protocol : null;
|
||||
return eaglerMessageController != null ? eaglerMessageController.getProtocol() : null;
|
||||
}
|
||||
|
||||
public void sendEaglerMessage(GameMessagePacket packet) {
|
||||
try {
|
||||
eaglerMessageController.sendPacket(packet);
|
||||
} catch (IOException e) {
|
||||
logger.error("Failed to send eaglercraft plugin message packet: " + packet);
|
||||
logger.error(e);
|
||||
}
|
||||
eaglerMessageController.sendPacket(packet);
|
||||
}
|
||||
|
||||
/**+
|
||||
@ -1277,10 +1288,10 @@ public class NetHandlerPlayServer implements INetHandlerPlayServer, ITickable {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (eaglerMessageController instanceof LegacyMessageController) {
|
||||
try {
|
||||
eaglerMessageController.handlePacket(c17packetcustompayload.getChannelName(),
|
||||
c17packetcustompayload.getBufferData());
|
||||
((LegacyMessageController) eaglerMessageController)
|
||||
.handlePacket(c17packetcustompayload.getChannelName(), c17packetcustompayload.getBufferData());
|
||||
} catch (IOException e) {
|
||||
logger.error("Couldn't read \"{}\" packet as an eaglercraft plugin message!",
|
||||
c17packetcustompayload.getChannelName());
|
||||
|
@ -848,4 +848,12 @@ public class PacketBuffer extends ByteBuf {
|
||||
return this.buf.toString();
|
||||
}
|
||||
|
||||
public byte[] toBytes() {
|
||||
int readerIndex = buf.readerIndex();
|
||||
int writerIndex = buf.writerIndex();
|
||||
byte[] bytes = new byte[writerIndex - readerIndex];
|
||||
buf.getBytes(readerIndex, bytes);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
}
|
@ -61,12 +61,11 @@ import net.minecraft.world.border.WorldBorder;
|
||||
import net.minecraft.world.demo.DemoWorldManager;
|
||||
import net.minecraft.world.storage.IPlayerFileData;
|
||||
import net.minecraft.world.storage.WorldInfo;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePluginMessageConstants;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePluginMessageProtocol;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.client.GameProtocolMessageController;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketUpdateCertEAG;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.server.EaglerMinecraftServer;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.server.WorldsDB;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.server.skins.PlayerTextureData;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.server.socket.IntegratedServerPlayerNetworkManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.server.voice.IntegratedVoiceService;
|
||||
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
@ -120,9 +119,9 @@ public abstract class ServerConfigurationManager {
|
||||
}
|
||||
|
||||
public void initializeConnectionToPlayer(IntegratedServerPlayerNetworkManager netManager, EntityPlayerMP playerIn,
|
||||
int protocolVersion, EaglercraftUUID clientBrandUUID) {
|
||||
GamePluginMessageProtocol protocolVersion, PlayerTextureData textureData, EaglercraftUUID clientBrandUUID) {
|
||||
playerIn.textureData = textureData;
|
||||
playerIn.clientBrandUUID = clientBrandUUID;
|
||||
GameProfile gameprofile1 = playerIn.getGameProfile();
|
||||
NBTTagCompound nbttagcompound = this.readPlayerDataFromFile(playerIn);
|
||||
playerIn.setWorld(this.mcServer.worldServerForDimension(playerIn.dimension));
|
||||
playerIn.theItemInWorldManager.setWorld((WorldServer) playerIn.worldObj);
|
||||
@ -134,11 +133,8 @@ public abstract class ServerConfigurationManager {
|
||||
WorldInfo worldinfo = worldserver.getWorldInfo();
|
||||
BlockPos blockpos = worldserver.getSpawnPoint();
|
||||
this.setPlayerGameTypeBasedOnOther(playerIn, (EntityPlayerMP) null, worldserver);
|
||||
NetHandlerPlayServer nethandlerplayserver = new NetHandlerPlayServer(this.mcServer, netManager, playerIn);
|
||||
nethandlerplayserver.setEaglerMessageController(new GameProtocolMessageController(
|
||||
GamePluginMessageProtocol.getByVersion(protocolVersion), GamePluginMessageConstants.SERVER_TO_CLIENT,
|
||||
GameProtocolMessageController.createServerHandler(protocolVersion, nethandlerplayserver),
|
||||
(ch, msg) -> nethandlerplayserver.sendPacket(new S3FPacketCustomPayload(ch, msg))));
|
||||
NetHandlerPlayServer nethandlerplayserver = new NetHandlerPlayServer(this.mcServer, netManager, playerIn,
|
||||
protocolVersion);
|
||||
nethandlerplayserver.sendPacket(new S01PacketJoinGame(playerIn.getEntityId(),
|
||||
playerIn.theItemInWorldManager.getGameType(), worldinfo.isHardcoreModeEnabled(),
|
||||
worldserver.provider.getDimensionId(), worldserver.getDifficulty(), this.getMaxPlayers(),
|
||||
@ -357,8 +353,6 @@ public abstract class ServerConfigurationManager {
|
||||
this.playerStatFiles.remove(entityplayermp.getName());
|
||||
}
|
||||
|
||||
((EaglerMinecraftServer) mcServer).getSkinService().unregisterPlayer(uuid);
|
||||
((EaglerMinecraftServer) mcServer).getCapeService().unregisterPlayer(uuid);
|
||||
IntegratedVoiceService vcs = ((EaglerMinecraftServer) mcServer).getVoiceService();
|
||||
if (vcs != null) {
|
||||
vcs.handlePlayerLoggedOut(playerIn);
|
||||
|
@ -2,11 +2,13 @@ package net.minecraft.server.network;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePluginMessageProtocol;
|
||||
import net.lax1dude.eaglercraft.v1_8.ClientUUIDLoadingCache;
|
||||
import net.lax1dude.eaglercraft.v1_8.EaglerInputStream;
|
||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
|
||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.server.EaglerMinecraftServer;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.server.skins.IntegratedTexturePackets;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.network.EnumConnectionState;
|
||||
import net.minecraft.network.login.INetHandlerLoginServer;
|
||||
@ -80,17 +82,12 @@ public class NetHandlerLoginServer implements INetHandlerLoginServer, ITickable
|
||||
if (entityplayermp == null) {
|
||||
this.currentLoginState = NetHandlerLoginServer.LoginState.READY_TO_ACCEPT;
|
||||
this.server.getConfigurationManager().initializeConnectionToPlayer(this.networkManager,
|
||||
this.field_181025_l, this.selectedProtocol, this.clientBrandUUID);
|
||||
((EaglerMinecraftServer) field_181025_l.mcServer).getSkinService()
|
||||
.processLoginPacket(this.loginSkinPacket, field_181025_l, 3); // singleplayer always sends V3
|
||||
// skin in handshake
|
||||
if (this.loginCapePacket != null) {
|
||||
((EaglerMinecraftServer) field_181025_l.mcServer).getCapeService()
|
||||
.processLoginPacket(this.loginCapePacket, field_181025_l);
|
||||
}
|
||||
this.field_181025_l, GamePluginMessageProtocol.getByVersion(this.selectedProtocol),
|
||||
IntegratedTexturePackets.handleTextureData(this.loginSkinPacket, this.loginCapePacket),
|
||||
this.clientBrandUUID);
|
||||
IntegratedVoiceService svc = ((EaglerMinecraftServer) field_181025_l.mcServer).getVoiceService();
|
||||
if (svc != null) {
|
||||
svc.handlePlayerLoggedIn(entityplayermp);
|
||||
svc.handlePlayerLoggedIn(this.field_181025_l);
|
||||
}
|
||||
this.field_181025_l = null;
|
||||
}
|
||||
@ -130,14 +127,9 @@ public class NetHandlerLoginServer implements INetHandlerLoginServer, ITickable
|
||||
} else {
|
||||
entityplayermp = this.server.getConfigurationManager().createPlayerForUser(this.loginGameProfile);
|
||||
this.server.getConfigurationManager().initializeConnectionToPlayer(this.networkManager, entityplayermp,
|
||||
this.selectedProtocol, this.clientBrandUUID);
|
||||
((EaglerMinecraftServer) entityplayermp.mcServer).getSkinService()
|
||||
.processLoginPacket(this.loginSkinPacket, entityplayermp, 3); // singleplayer always sends V3
|
||||
// skin in handshake
|
||||
if (this.loginCapePacket != null) {
|
||||
((EaglerMinecraftServer) entityplayermp.mcServer).getCapeService()
|
||||
.processLoginPacket(this.loginCapePacket, entityplayermp);
|
||||
}
|
||||
GamePluginMessageProtocol.getByVersion(this.selectedProtocol),
|
||||
IntegratedTexturePackets.handleTextureData(this.loginSkinPacket, this.loginCapePacket),
|
||||
this.clientBrandUUID);
|
||||
IntegratedVoiceService svc = ((EaglerMinecraftServer) entityplayermp.mcServer).getVoiceService();
|
||||
if (svc != null) {
|
||||
svc.handlePlayerLoggedIn(entityplayermp);
|
||||
@ -171,7 +163,7 @@ public class NetHandlerLoginServer implements INetHandlerLoginServer, ITickable
|
||||
int protocolCount = dis.readUnsignedShort();
|
||||
for (int i = 0; i < protocolCount; ++i) {
|
||||
int p = dis.readUnsignedShort();
|
||||
if ((p == 3 || p == 4) && p > maxSupported) {
|
||||
if ((p == 3 || p == 4 || p == 5) && p > maxSupported) {
|
||||
maxSupported = p;
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user