Skip to content

Commit c67fe47

Browse files
author
eaglercraft
committed
u44
1 parent 8b8ae06 commit c67fe47

File tree

211 files changed

+33946
-171
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

211 files changed

+33946
-171
lines changed

EAGLERCRAFTX_README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121

2222
## Getting Started:
2323

24-
### To compile the latest version of the client, on Windows:
24+
### To compile the latest version of the JavaScript client, on Windows:
2525

2626
1. Make sure you have at least Java 11 installed and added to your PATH, it is recommended to use Java 17
2727
2. Download (clone) this repository to your computer
2828
3. Double click `CompileLatestClient.bat`, a GUI resembling a classic windows installer should open
2929
4. Follow the steps shown to you in the new window to finish compiling
3030

31-
### To compile the latest version of the client, on Linux/macOS:
31+
### To compile the latest version of the JavaScript client, on Linux/macOS:
3232

3333
1. Make sure you have at least Java 11 installed, it is recommended to use Java 17
3434
2. Download (clone) this repository to your computer
@@ -37,9 +37,21 @@
3737
5. Type `./CompileLatestClient.sh` and hit enter, a GUI resembling a classic windows installer should open
3838
6. Follow the steps shown to you in the new window to finish compiling
3939

40+
### To set up the development environment
41+
42+
1. Prepare the required files in the mcp918 folder ([readme](mcp918/readme.txt))
43+
2. Run the `build_init` script
44+
3. Run the `build_make_workspace` script
45+
4046
## Browser Compatibility
4147

42-
EaglercraftX 1.8 is currently known to work on browsers as old as Chrome 38 on Windows XP, the game supports both WebGL 1.0 and WebGL 2.0 however features such as dynamic lighting and PBR shaders require WebGL 2.0. The game also supports mobile browsers that don't have a keyboard or mouse, the game will enter touch screen mode automatically when touch input is detected. The game also includes an embedded OGG codec (JOrbis) for loading audio files on iOS where the browsers don't support loading OGG files in an AudioContext.
48+
The JavaScript runtime of EaglercraftX 1.8 is currently known to work on browsers as old as Chrome 38 on Windows XP, the game supports both WebGL 1.0 and WebGL 2.0 however features such as dynamic lighting and PBR shaders require WebGL 2.0. The game also supports mobile browsers that don't have a keyboard or mouse, the game will enter touch screen mode automatically when touch input is detected. The game also includes an embedded OGG codec (JOrbis) for loading audio files on iOS where the browsers don't support loading OGG files in an AudioContext.
49+
50+
## WebAssembly GC Support
51+
52+
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.
53+
54+
You can compile the WebAssembly GC runtime by creating a development environment (workspace) and reading the README in the "wasm_gc_teavm" folder.
4355

4456
## Singleplayer
4557

@@ -200,6 +212,7 @@ The default eaglercraftXOpts values is this:
200212
- `ramdiskMode:` if worlds and resource packs should be stored in RAM instead of IndexedDB
201213
- `singleThreadMode:` if the game should run the client and integrated server in the same context instead of creating a worker object
202214
- `enableEPKVersionCheck:` if the game should attempt to bypass the browser's cache and retry downloading assets.epk when its outdated
215+
- `enforceVSync:` (WASM only) if the game should automatically re-enable VSync at launch if its disabled
203216
- `hooks:` can be used to define JavaScript callbacks for certain events
204217
* `localStorageSaved:` JavaScript callback to save local storage keys (key, data)
205218
* `localStorageLoaded:` JavaScript callback to load local storage keys (key) returns data

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ Java must be added to your PATH!
1717
3. Run `MakeOfflineDownload`
1818
4. Check the "javascript" folder
1919

20+
**To compile the WASM GC client:**
21+
Consult the [README](wasm_gc_teavm/README.md) in the wasm_gc_teavm folder
22+
2023
**To use the desktop runtime:**
2124
1. Import the Eclipse project in "desktopRuntime/eclipseProject" into your IDE
2225
2. Open one of the .java files from the source folders (workaround for a bug)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
u43
1+
u44

desktopRuntime/resources/assets/eagler/CREDITS.txt

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -785,3 +785,78 @@
785785
* THE SOFTWARE.
786786

787787
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
788+
789+
Project Name: Emscripten
790+
Project Author: Emscripten authors
791+
Project URL: https://emscripten.org/
792+
793+
Used For: Compiling the WASM runtime's loader.wasm program
794+
795+
* Emscripten is available under 2 licenses, the MIT license and the
796+
* University of Illinois/NCSA Open Source License.
797+
*
798+
* Copyright (c) 2010-2014 Emscripten authors, see AUTHORS file.
799+
*
800+
* Permission is hereby granted, free of charge, to any person obtaining a copy
801+
* of this software and associated documentation files (the "Software"), to deal
802+
* in the Software without restriction, including without limitation the rights
803+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
804+
* copies of the Software, and to permit persons to whom the Software is
805+
* furnished to do so, subject to the following conditions:
806+
*
807+
* The above copyright notice and this permission notice shall be included in
808+
* all copies or substantial portions of the Software.
809+
*
810+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
811+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
812+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
813+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
814+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
815+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
816+
* THE SOFTWARE.
817+
818+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
819+
820+
Project Name: XZ Embedded
821+
Project Author: Lasse Collin (Larhzu)
822+
Project URL: https://tukaani.org/xz/embedded.html
823+
824+
Used For: Decompressing the WASM runtime
825+
826+
* Copyright (C) The XZ Embedded authors and contributors
827+
*
828+
* Permission to use, copy, modify, and/or distribute this
829+
* software for any purpose with or without fee is hereby granted.
830+
*
831+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
832+
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
833+
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
834+
* THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
835+
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
836+
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
837+
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
838+
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
839+
840+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
841+
842+
Project Name: XZ for Java
843+
Project Author: Lasse Collin (Larhzu)
844+
Project URL: https://tukaani.org/xz/java.html
845+
846+
Used For: Compression in the MakeWASMClientBundle command
847+
848+
* Copyright (C) The XZ for Java authors and contributors
849+
*
850+
* Permission to use, copy, modify, and/or distribute this
851+
* software for any purpose with or without fee is hereby granted.
852+
*
853+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
854+
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
855+
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
856+
* THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
857+
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
858+
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
859+
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
860+
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
861+
862+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

desktopRuntime/resources/assets/minecraft/lang/en_US.lang

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,13 @@ eaglercraft.options.badVideoSettingsDetected.fixSettings=Fix Settings
823823
eaglercraft.options.badVideoSettingsDetected.continueAnyway=Continue Anyway
824824
eaglercraft.options.badVideoSettingsDetected.doNotShowAgain=Do Not Show Again
825825

826+
eaglercraft.options.vsyncReEnabled.title=Issues Detected
827+
eaglercraft.options.vsyncReEnabled.0=You are using the WASM-GC client
828+
eaglercraft.options.vsyncReEnabled.1=VSync has been automatically re-enabled
829+
eaglercraft.options.vsyncReEnabled.2=Using the WASM-GC version of EaglercraftX without
830+
eaglercraft.options.vsyncReEnabled.3=VSync enabled causes bad input lag, sorry!
831+
eaglercraft.options.vsyncReEnabled.continue=Continue
832+
826833
selectServer.title=Select Server
827834
selectServer.empty=empty
828835
selectServer.select=Join Server
1015 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"pluginName":"EaglercraftXBungee","pluginVersion":"1.3.3","pluginButton":"Download \"EaglerXBungee-1.3.3.jar\"","pluginFilename":"EaglerXBungee.zip"}
1+
{"pluginName":"EaglercraftXBungee","pluginVersion":"1.3.4","pluginButton":"Download \"EaglerXBungee-1.3.4.jar\"","pluginFilename":"EaglerXBungee.zip"}

src/game/java/net/minecraft/client/Minecraft.java

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerFontRenderer;
4444
import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
4545
import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenGenericErrorMessage;
46+
import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenVSyncReEnabled;
4647
import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenVideoSettingsWarning;
4748
import net.lax1dude.eaglercraft.v1_8.notifications.ServerNotificationRenderer;
4849
import net.lax1dude.eaglercraft.v1_8.opengl.EaglerMeshLoader;
@@ -524,15 +525,26 @@ public String formatString(String parString1) {
524525
mainMenu = new GuiConnecting(mainMenu, this, this.serverName, this.serverPort);
525526
}
526527

528+
mainMenu = new GuiScreenEditProfile(mainMenu);
529+
530+
if (!EagRuntime.getConfiguration().isForceProfanityFilter() && !gameSettings.hasShownProfanityFilter) {
531+
mainMenu = new GuiScreenContentWarning(mainMenu);
532+
}
533+
534+
boolean vsyncScreen = false;
535+
if (EagRuntime.getConfiguration().isEnforceVSync() && Display.isVSyncSupported() && !gameSettings.enableVsync) {
536+
gameSettings.enableVsync = true;
537+
gameSettings.saveOptions();
538+
vsyncScreen = true;
539+
}
540+
527541
int vidIssues = gameSettings.checkBadVideoSettings();
528542
if (vidIssues != 0) {
529543
mainMenu = new GuiScreenVideoSettingsWarning(mainMenu, vidIssues);
530544
}
531545

532-
mainMenu = new GuiScreenEditProfile(mainMenu);
533-
534-
if (!EagRuntime.getConfiguration().isForceProfanityFilter() && !gameSettings.hasShownProfanityFilter) {
535-
mainMenu = new GuiScreenContentWarning(mainMenu);
546+
if (vsyncScreen) {
547+
mainMenu = new GuiScreenVSyncReEnabled(mainMenu);
536548
}
537549

538550
this.displayGuiScreen(mainMenu);

src/game/java/net/minecraft/client/gui/GuiOverlayDebug.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ protected List<String> call() {
430430

431431
protected List<String> getDebugInfoRight() {
432432
ArrayList arraylist;
433-
if (EagRuntime.getPlatformType() != EnumPlatformType.JAVASCRIPT) {
433+
if (EagRuntime.getPlatformType() == EnumPlatformType.DESKTOP) {
434434
long i = EagRuntime.maxMemory();
435435
long j = EagRuntime.totalMemory();
436436
long k = EagRuntime.freeMemory();

src/game/java/net/minecraft/client/gui/GuiScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public void drawScreen(int i, int j, float var3) {
118118

119119
long millis = EagRuntime.steadyTimeMillis();
120120
long closeKeyTimeout = millis - showingCloseKey;
121-
if (closeKeyTimeout < 3000l) {
121+
if (closeKeyTimeout < 3000l && showingCloseKey != 0l) {
122122
int alpha1 = 0xC0000000;
123123
int alpha2 = 0xFF000000;
124124
if (closeKeyTimeout > 2500l) {

0 commit comments

Comments
 (0)