Skip to content

Commit 2072701

Browse files
author
eaglercraft
committed
u40
1 parent d50d01b commit 2072701

File tree

79 files changed

+918
-702
lines changed

Some content is hidden

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

79 files changed

+918
-702
lines changed

EAGLERCRAFTX_README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ The default eaglercraftXOpts values is this:
158158
- `demoMode:` whether to launch the game in java edition demo mode
159159
- `servers:` a list of default servers to display on the Multiplayer screen
160160
- `relays:` the default list of shared world relays to use for invites
161+
- `checkGLErrors:` if the game should check for opengl errors
161162
- `checkShaderGLErrors:` enables more verbose opengl error logging for the shaders
162163
- `enableDownloadOfflineButton:` whether to show a "Download Offline" button on the title screen
163164
- `downloadOfflineButtonLink:` overrides the download link for the "Download Offline" button
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
u39
1+
u40

desktopRuntime/resources/assets/eagler/boot_menu/opts_template_eaglercraftX_1_8.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"autoFixLegacyStyleAttr": true,
4949
"allowUpdateDL": true,
5050
"logInvalidCerts": false,
51+
"checkGLErrors": false,
5152
"checkShaderGLErrors": false,
5253
"crashOnUncaughtExceptions": false,
5354
"forceWebGL1": false,

desktopRuntime/resources/assets/eagler/boot_menu/opts_template_eaglercraftX_1_8_demo.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"autoFixLegacyStyleAttr": true,
4949
"allowUpdateDL": true,
5050
"logInvalidCerts": false,
51+
"checkGLErrors": false,
5152
"checkShaderGLErrors": false,
5253
"crashOnUncaughtExceptions": false,
5354
"forceWebGL1": false,

desktopRuntime/resources/assets/eagler/boot_menu/opts_template_eaglercraftX_1_8_html5Cursors.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"autoFixLegacyStyleAttr": true,
4949
"allowUpdateDL": true,
5050
"logInvalidCerts": false,
51+
"checkGLErrors": false,
5152
"checkShaderGLErrors": false,
5253
"crashOnUncaughtExceptions": false,
5354
"forceWebGL1": false,
896 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.1","pluginButton":"Download \"EaglerXBungee-1.3.1.jar\"","pluginFilename":"EaglerXBungee.zip"}
1+
{"pluginName":"EaglercraftXBungee","pluginVersion":"1.3.2","pluginButton":"Download \"EaglerXBungee-1.3.2.jar\"","pluginFilename":"EaglerXBungee.zip"}

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,6 @@ public void setLoadingProgress(int progress) {
195195
(float) (l / 2 - 4 + 8), 16777215);
196196
}
197197
this.mc.updateDisplay();
198-
199-
try {
200-
Thread.yield();
201-
} catch (Exception var15) {
202-
;
203-
}
204-
205198
}
206199
}
207200
}

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

Lines changed: 22 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
2626
import net.lax1dude.eaglercraft.v1_8.Touch;
2727
import net.lax1dude.eaglercraft.v1_8.cookie.ServerCookieDataStore;
28-
import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput;
2928

3029
import org.apache.commons.lang3.Validate;
3130

@@ -228,7 +227,7 @@ public class Minecraft implements IThreadListener {
228227
private static Minecraft theMinecraft;
229228
public PlayerControllerMP playerController;
230229
private boolean fullscreen;
231-
private boolean enableGLErrorChecking = true;
230+
private boolean enableGLErrorChecking = false;
232231
private boolean hasCrashed;
233232
private CrashReport crashReporter;
234233
public int displayWidth;
@@ -271,7 +270,7 @@ public class Minecraft implements IThreadListener {
271270
long systemTime = getSystemTime();
272271
private int joinPlayerCounter;
273272
public final FrameTimer field_181542_y = new FrameTimer();
274-
long field_181543_z = System.nanoTime();
273+
long field_181543_z = EagRuntime.nanoTime();
275274
private final boolean jvm64bit;
276275
private EaglercraftNetworkManager myNetworkManager;
277276
private boolean integratedServerIsRunning;
@@ -347,6 +346,7 @@ public Minecraft(GameConfiguration gameConfig) {
347346
this.tempDisplayHeight = gameConfig.displayInfo.height;
348347
this.fullscreen = gameConfig.displayInfo.fullscreen;
349348
this.jvm64bit = isJvm64bit();
349+
this.enableGLErrorChecking = EagRuntime.getConfiguration().isCheckGLErrors();
350350
String serverToJoin = EagRuntime.getConfiguration().getServerToJoin();
351351
if (serverToJoin != null) {
352352
ServerAddress addr = AddressResolver.resolveAddressFromURI(serverToJoin);
@@ -795,14 +795,14 @@ public void shutdownMinecraftApplet() {
795795
if (SingleplayerServerController.isWorldRunning()) {
796796
SingleplayerServerController.shutdownEaglercraftServer();
797797
while (SingleplayerServerController.getStatusState() == IntegratedServerState.WORLD_UNLOADING) {
798-
EagUtils.sleep(50l);
798+
EagUtils.sleep(50);
799799
SingleplayerServerController.runTick();
800800
}
801801
}
802802
if (SingleplayerServerController.isIntegratedServerWorkerAlive()
803803
&& SingleplayerServerController.canKillWorker()) {
804804
SingleplayerServerController.killWorker();
805-
EagUtils.sleep(50l);
805+
EagUtils.sleep(50);
806806
}
807807
} finally {
808808
EagRuntime.destroy();
@@ -817,7 +817,7 @@ public void shutdownMinecraftApplet() {
817817
* Called repeatedly from run()
818818
*/
819819
private void runGameLoop() throws IOException {
820-
long i = System.nanoTime();
820+
long i = EagRuntime.nanoTime();
821821
if (Display.isCloseRequested()) {
822822
this.shutdown();
823823
}
@@ -839,26 +839,16 @@ private void runGameLoop() throws IOException {
839839
}
840840
}
841841

842-
long l = System.nanoTime();
842+
long l = EagRuntime.nanoTime();
843843

844-
if (this.timer.elapsedTicks > 1) {
845-
long watchdog = EagRuntime.steadyTimeMillis();
846-
for (int j = 0; j < this.timer.elapsedTicks; ++j) {
847-
this.runTick();
848-
if (j < this.timer.elapsedTicks - 1) {
849-
PointerInputAbstraction.runGameLoop();
850-
}
851-
long millis = EagRuntime.steadyTimeMillis();
852-
if (millis - watchdog > 50l) {
853-
watchdog = millis;
854-
EagRuntime.immediateContinue();
855-
}
856-
}
857-
} else if (this.timer.elapsedTicks == 1) {
844+
for (int j = 0; j < this.timer.elapsedTicks; ++j) {
858845
this.runTick();
846+
if (j < this.timer.elapsedTicks - 1) {
847+
PointerInputAbstraction.runGameLoop();
848+
}
859849
}
860850

861-
long i1 = System.nanoTime() - l;
851+
long i1 = EagRuntime.nanoTime() - l;
862852
this.checkGLError("Pre render");
863853
this.mcSoundHandler.setListener(this.thePlayer, this.timer.renderPartialTicks);
864854

@@ -887,7 +877,7 @@ private void runGameLoop() throws IOException {
887877
this.checkGLError("Post render");
888878

889879
++this.fpsCounter;
890-
long k = System.nanoTime();
880+
long k = EagRuntime.nanoTime();
891881
this.field_181542_y.func_181747_a(k - this.field_181543_z);
892882
this.field_181543_z = k;
893883

@@ -906,9 +896,9 @@ private void runGameLoop() throws IOException {
906896
this.fpsCounter = 0;
907897
}
908898

909-
if (this.isFramerateLimitBelowMax()) {
910-
Display.sync(this.getLimitFramerate());
911-
}
899+
// if (this.isFramerateLimitBelowMax()) {
900+
// Display.sync(this.getLimitFramerate());
901+
// }
912902

913903
Mouse.tickCursorShape();
914904
}
@@ -919,7 +909,11 @@ public void updateDisplay() {
919909
} else {
920910
this.gameSettings.enableVsync = false;
921911
}
922-
Display.update();
912+
if (!this.gameSettings.enableVsync && this.isFramerateLimitBelowMax()) {
913+
Display.update(this.getLimitFramerate());
914+
} else {
915+
Display.update(0);
916+
}
923917
this.checkWindowResize();
924918
}
925919

@@ -1388,7 +1382,7 @@ public String call() throws Exception {
13881382

13891383
while (Keyboard.next()) {
13901384
int k = Keyboard.getEventKey() == 0 ? Keyboard.getEventCharacter() + 256 : Keyboard.getEventKey();
1391-
if (k == 0x1D && (areKeysLocked() || isFullScreen())) {
1385+
if (k == 0x1D && (Keyboard.areKeysLocked() || isFullScreen())) {
13921386
KeyBinding.setKeyBindState(gameSettings.keyBindSprint.getKeyCode(), Keyboard.getEventKeyState());
13931387
}
13941388
KeyBinding.setKeyBindState(k, Keyboard.getEventKeyState());
@@ -2413,10 +2407,6 @@ public static int getGLMaximumTextureSize() {
24132407
return EaglercraftGPU.glGetInteger(GL_MAX_TEXTURE_SIZE);
24142408
}
24152409

2416-
public boolean areKeysLocked() {
2417-
return PlatformInput.lockKeys;
2418-
}
2419-
24202410
public ModelManager getModelManager() {
24212411
return modelManager;
24222412
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public void updateScreen0() {
122122
* on the key), keyCode (lwjgl Keyboard key code)
123123
*/
124124
protected void keyTyped(char parChar1, int parInt1) {
125-
if (parInt1 == 1 && (this.mc.gameSettings.keyBindClose.getKeyCode() == 0 || this.mc.areKeysLocked())) {
125+
if (parInt1 == 1 && (this.mc.gameSettings.keyBindClose.getKeyCode() == 0 || Keyboard.areKeysLocked())) {
126126
this.mc.displayGuiScreen((GuiScreen) null);
127127
} else {
128128
this.waitingOnAutocomplete = false;

0 commit comments

Comments
 (0)