Update #41 - Fix swords unable to break blocks in survival
This commit is contained in:
parent
79eae996fd
commit
6d8df8128f
|
@ -1 +1 @@
|
||||||
u40
|
u41
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
> DELETE 1 @ 1 : 4
|
> DELETE 1 @ 1 : 4
|
||||||
|
|
||||||
> CHANGE 1 : 73 @ 1 : 4
|
> CHANGE 1 : 74 @ 1 : 4
|
||||||
|
|
||||||
~
|
~
|
||||||
~ import net.lax1dude.eaglercraft.v1_8.ClientUUIDLoadingCache;
|
~ import net.lax1dude.eaglercraft.v1_8.ClientUUIDLoadingCache;
|
||||||
|
@ -52,6 +52,7 @@
|
||||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerFontRenderer;
|
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerFontRenderer;
|
||||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
|
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
|
||||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenGenericErrorMessage;
|
~ import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenGenericErrorMessage;
|
||||||
|
~ import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenVideoSettingsWarning;
|
||||||
~ import net.lax1dude.eaglercraft.v1_8.notifications.ServerNotificationRenderer;
|
~ import net.lax1dude.eaglercraft.v1_8.notifications.ServerNotificationRenderer;
|
||||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.EaglerMeshLoader;
|
~ import net.lax1dude.eaglercraft.v1_8.opengl.EaglerMeshLoader;
|
||||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
~ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
||||||
|
@ -358,21 +359,27 @@
|
||||||
|
|
||||||
~ mainMenu = new GuiConnecting(mainMenu, this, this.serverName, this.serverPort);
|
~ mainMenu = new GuiConnecting(mainMenu, this, this.serverName, this.serverPort);
|
||||||
|
|
||||||
> INSERT 2 : 10 @ 2
|
> CHANGE 2 : 5 @ 2 : 7
|
||||||
|
|
||||||
+ mainMenu = new GuiScreenEditProfile(mainMenu);
|
~ int vidIssues = gameSettings.checkBadVideoSettings();
|
||||||
+
|
~ if (vidIssues != 0) {
|
||||||
+ if (!EagRuntime.getConfiguration().isForceProfanityFilter() && !gameSettings.hasShownProfanityFilter) {
|
~ mainMenu = new GuiScreenVideoSettingsWarning(mainMenu, vidIssues);
|
||||||
+ mainMenu = new GuiScreenContentWarning(mainMenu);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ this.displayGuiScreen(mainMenu);
|
|
||||||
+
|
|
||||||
|
|
||||||
> DELETE 3 @ 3 : 6
|
> CHANGE 2 : 6 @ 2 : 7
|
||||||
|
|
||||||
> CHANGE 1 : 7 @ 1 : 9
|
~ mainMenu = new GuiScreenEditProfile(mainMenu);
|
||||||
|
~
|
||||||
|
~ if (!EagRuntime.getConfiguration().isForceProfanityFilter() && !gameSettings.hasShownProfanityFilter) {
|
||||||
|
~ mainMenu = new GuiScreenContentWarning(mainMenu);
|
||||||
|
|
||||||
|
> CHANGE 2 : 14 @ 2 : 3
|
||||||
|
|
||||||
|
~ this.displayGuiScreen(mainMenu);
|
||||||
|
~
|
||||||
|
~ this.renderEngine.deleteTexture(this.mojangLogo);
|
||||||
|
~ this.mojangLogo = null;
|
||||||
|
~ this.loadingScreen = new LoadingScreenRenderer(this);
|
||||||
|
~
|
||||||
~ while (Mouse.next())
|
~ while (Mouse.next())
|
||||||
~ ;
|
~ ;
|
||||||
~ while (Keyboard.next())
|
~ while (Keyboard.next())
|
||||||
|
@ -959,10 +966,11 @@
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
|
||||||
> INSERT 26 : 28 @ 26
|
> INSERT 26 : 29 @ 26
|
||||||
|
|
||||||
+ boolean miningTouch = isMiningTouch();
|
+ boolean touchMode = PointerInputAbstraction.isTouchMode();
|
||||||
+ boolean useTouch = thePlayer.getItemShouldUseOnTouchEagler();
|
+ boolean miningTouch = touchMode && isMiningTouch();
|
||||||
|
+ boolean useTouch = touchMode && thePlayer.getItemShouldUseOnTouchEagler();
|
||||||
|
|
||||||
> CHANGE 1 : 2 @ 1 : 2
|
> CHANGE 1 : 2 @ 1 : 2
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,11 @@
|
||||||
# Version: 1.0
|
# Version: 1.0
|
||||||
# Author: lax1dude
|
# Author: lax1dude
|
||||||
|
|
||||||
> CHANGE 3 : 8 @ 3 : 9
|
> CHANGE 3 : 9 @ 3 : 9
|
||||||
|
|
||||||
~
|
~
|
||||||
~ import net.lax1dude.eaglercraft.v1_8.Display;
|
~ import net.lax1dude.eaglercraft.v1_8.Display;
|
||||||
|
~ import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenVideoSettingsWarning;
|
||||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
~ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
||||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||||
~ import net.lax1dude.eaglercraft.v1_8.recording.ScreenRecordingController;
|
~ import net.lax1dude.eaglercraft.v1_8.recording.ScreenRecordingController;
|
||||||
|
@ -71,7 +72,18 @@
|
||||||
~
|
~
|
||||||
~ protected void actionPerformed(GuiButton parGuiButton) {
|
~ protected void actionPerformed(GuiButton parGuiButton) {
|
||||||
|
|
||||||
> CHANGE 9 : 10 @ 9 : 10
|
> CHANGE 3 : 9 @ 3 : 4
|
||||||
|
|
||||||
|
~ GuiScreen contScreen = parentGuiScreen;
|
||||||
|
~ int vidIssues = mc.gameSettings.checkBadVideoSettings();
|
||||||
|
~ if (vidIssues != 0) {
|
||||||
|
~ contScreen = new GuiScreenVideoSettingsWarning(contScreen, vidIssues);
|
||||||
|
~ }
|
||||||
|
~ this.mc.displayGuiScreen(contScreen);
|
||||||
|
|
||||||
|
> DELETE 1 @ 1 : 2
|
||||||
|
|
||||||
|
> CHANGE 3 : 4 @ 3 : 4
|
||||||
|
|
||||||
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
|
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
> DELETE 1 @ 1 : 3
|
> DELETE 1 @ 1 : 3
|
||||||
|
|
||||||
> INSERT 3 : 31 @ 3
|
> INSERT 3 : 32 @ 3
|
||||||
|
|
||||||
+
|
+
|
||||||
+ import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayManager;
|
+ import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayManager;
|
||||||
|
@ -39,6 +39,7 @@
|
||||||
+ import net.lax1dude.eaglercraft.v1_8.internal.KeyboardConstants;
|
+ import net.lax1dude.eaglercraft.v1_8.internal.KeyboardConstants;
|
||||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||||
|
+ import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenVideoSettingsWarning;
|
||||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredConfig;
|
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredConfig;
|
||||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredPipeline;
|
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredPipeline;
|
||||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||||
|
@ -95,7 +96,7 @@
|
||||||
|
|
||||||
~ public int guiScale = 3;
|
~ public int guiScale = 3;
|
||||||
|
|
||||||
> INSERT 3 : 23 @ 3
|
> INSERT 3 : 24 @ 3
|
||||||
|
|
||||||
+ public boolean hudFps = true;
|
+ public boolean hudFps = true;
|
||||||
+ public boolean hudCoords = true;
|
+ public boolean hudCoords = true;
|
||||||
|
@ -117,6 +118,7 @@
|
||||||
+ public boolean hasShownProfanityFilter = false;
|
+ public boolean hasShownProfanityFilter = false;
|
||||||
+ public float touchControlOpacity = 1.0f;
|
+ public float touchControlOpacity = 1.0f;
|
||||||
+ public boolean hideDefaultUsernameWarning = false;
|
+ public boolean hideDefaultUsernameWarning = false;
|
||||||
|
+ public boolean hideVideoSettingsWarning = false;
|
||||||
|
|
||||||
> CHANGE 1 : 15 @ 1 : 2
|
> CHANGE 1 : 15 @ 1 : 2
|
||||||
|
|
||||||
|
@ -536,7 +538,7 @@
|
||||||
|
|
||||||
~ for (EnumPlayerModelParts enumplayermodelparts : EnumPlayerModelParts._VALUES) {
|
~ for (EnumPlayerModelParts enumplayermodelparts : EnumPlayerModelParts._VALUES) {
|
||||||
|
|
||||||
> INSERT 4 : 70 @ 4
|
> INSERT 4 : 74 @ 4
|
||||||
|
|
||||||
+
|
+
|
||||||
+ if (astring[0].equals("enableFNAWSkins")) {
|
+ if (astring[0].equals("enableFNAWSkins")) {
|
||||||
|
@ -603,6 +605,10 @@
|
||||||
+ this.hideDefaultUsernameWarning = astring[1].equals("true");
|
+ this.hideDefaultUsernameWarning = astring[1].equals("true");
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
+ if (astring[0].equals("hideVideoSettingsWarning")) {
|
||||||
|
+ hideVideoSettingsWarning = astring[1].equals("true");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
+ deferredShaderConf.readOption(astring[0], astring[1]);
|
+ deferredShaderConf.readOption(astring[0], astring[1]);
|
||||||
|
|
||||||
> CHANGE 6 : 23 @ 6 : 7
|
> CHANGE 6 : 23 @ 6 : 7
|
||||||
|
@ -666,7 +672,7 @@
|
||||||
|
|
||||||
> DELETE 9 @ 9 : 20
|
> DELETE 9 @ 9 : 20
|
||||||
|
|
||||||
> INSERT 5 : 36 @ 5
|
> INSERT 5 : 37 @ 5
|
||||||
|
|
||||||
+ printwriter.println("hudFps:" + this.hudFps);
|
+ printwriter.println("hudFps:" + this.hudFps);
|
||||||
+ printwriter.println("hudWorld:" + this.hudWorld);
|
+ printwriter.println("hudWorld:" + this.hudWorld);
|
||||||
|
@ -699,6 +705,7 @@
|
||||||
+ printwriter.println("screenRecordMicVolume:" + this.screenRecordMicVolume);
|
+ printwriter.println("screenRecordMicVolume:" + this.screenRecordMicVolume);
|
||||||
+ printwriter.println("touchControlOpacity:" + this.touchControlOpacity);
|
+ printwriter.println("touchControlOpacity:" + this.touchControlOpacity);
|
||||||
+ printwriter.println("hideDefaultUsernameWarning:" + this.hideDefaultUsernameWarning);
|
+ printwriter.println("hideDefaultUsernameWarning:" + this.hideDefaultUsernameWarning);
|
||||||
|
+ printwriter.println("hideVideoSettingsWarning:" + this.hideVideoSettingsWarning);
|
||||||
|
|
||||||
> CHANGE 5 : 8 @ 5 : 6
|
> CHANGE 5 : 8 @ 5 : 6
|
||||||
|
|
||||||
|
@ -731,7 +738,7 @@
|
||||||
|
|
||||||
~ Math.max(this.renderDistanceChunks, 2), this.chatVisibility, this.chatColours, i));
|
~ Math.max(this.renderDistanceChunks, 2), this.chatVisibility, this.chatColours, i));
|
||||||
|
|
||||||
> INSERT 36 : 44 @ 36
|
> INSERT 36 : 60 @ 36
|
||||||
|
|
||||||
+ private String toJSONArray(List<String> e) {
|
+ private String toJSONArray(List<String> e) {
|
||||||
+ JSONArray arr = new JSONArray();
|
+ JSONArray arr = new JSONArray();
|
||||||
|
@ -741,6 +748,22 @@
|
||||||
+ return arr.toString();
|
+ return arr.toString();
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
+ public int checkBadVideoSettings() {
|
||||||
|
+ return hideVideoSettingsWarning ? 0
|
||||||
|
+ : ((renderDistanceChunks > 6 ? GuiScreenVideoSettingsWarning.WARNING_RENDER_DISTANCE : 0)
|
||||||
|
+ | (!enableVsync ? GuiScreenVideoSettingsWarning.WARNING_VSYNC : 0)
|
||||||
|
+ | (limitFramerate < 30 ? GuiScreenVideoSettingsWarning.WARNING_FRAME_LIMIT : 0));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public void fixBadVideoSettings() {
|
||||||
|
+ if (renderDistanceChunks > 6)
|
||||||
|
+ renderDistanceChunks = 4;
|
||||||
|
+ if (!enableVsync)
|
||||||
|
+ enableVsync = true;
|
||||||
|
+ if (limitFramerate < 30)
|
||||||
|
+ limitFramerate = 260;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
|
||||||
> CHANGE 4 : 5 @ 4 : 5
|
> CHANGE 4 : 5 @ 4 : 5
|
||||||
|
|
||||||
|
|
|
@ -257,7 +257,7 @@
|
||||||
+ eaglercraft.command.clientStub=This command is client side!
|
+ eaglercraft.command.clientStub=This command is client side!
|
||||||
+
|
+
|
||||||
|
|
||||||
> INSERT 163 : 545 @ 163
|
> INSERT 163 : 561 @ 163
|
||||||
|
|
||||||
+ eaglercraft.singleplayer.busy.killTask=Cancel Task
|
+ eaglercraft.singleplayer.busy.killTask=Cancel Task
|
||||||
+ eaglercraft.singleplayer.busy.cancelWarning=Are you sure?
|
+ eaglercraft.singleplayer.busy.cancelWarning=Are you sure?
|
||||||
|
@ -641,6 +641,22 @@
|
||||||
+
|
+
|
||||||
+ eaglercraft.touch.interact.entity=Interact
|
+ eaglercraft.touch.interact.entity=Interact
|
||||||
+
|
+
|
||||||
|
+ eaglercraft.options.badVideoSettingsDetected.title=Issues Detected
|
||||||
|
+ eaglercraft.options.badVideoSettingsDetected.0=Some of your video settings may be causing
|
||||||
|
+ eaglercraft.options.badVideoSettingsDetected.1=the game to lag excessively
|
||||||
|
+ eaglercraft.options.badVideoSettingsDetected.vsync.0=VSync is disabled, some browsers require
|
||||||
|
+ eaglercraft.options.badVideoSettingsDetected.vsync.1=VSync to be enabled to hint when the
|
||||||
|
+ eaglercraft.options.badVideoSettingsDetected.vsync.2=framebuffer has updated. If the game feels
|
||||||
|
+ eaglercraft.options.badVideoSettingsDetected.vsync.3=significantly slower than is indicated by
|
||||||
|
+ eaglercraft.options.badVideoSettingsDetected.vsync.4=the FPS counter, you should enable VSync.
|
||||||
|
+ eaglercraft.options.badVideoSettingsDetected.renderDistance.0=Render distance is %d chunks, most devices
|
||||||
|
+ eaglercraft.options.badVideoSettingsDetected.renderDistance.1=lag when the render distance is greater
|
||||||
|
+ eaglercraft.options.badVideoSettingsDetected.renderDistance.2=than 4 chunks
|
||||||
|
+ eaglercraft.options.badVideoSettingsDetected.frameLimit.0=Framerate limit is set to %d
|
||||||
|
+ eaglercraft.options.badVideoSettingsDetected.fixSettings=Fix Settings
|
||||||
|
+ eaglercraft.options.badVideoSettingsDetected.continueAnyway=Continue Anyway
|
||||||
|
+ eaglercraft.options.badVideoSettingsDetected.doNotShowAgain=Do Not Show Again
|
||||||
|
+
|
||||||
|
|
||||||
> INSERT 18 : 19 @ 18
|
> INSERT 18 : 19 @ 18
|
||||||
|
|
||||||
|
|
|
@ -268,6 +268,7 @@ public class PlatformRuntime {
|
||||||
|
|
||||||
glfwSwapInterval(0);
|
glfwSwapInterval(0);
|
||||||
|
|
||||||
|
if(!requestedDisableKHRDebug) {
|
||||||
KHRDebug.glDebugMessageCallbackKHR(new GLDebugMessageKHRCallbackI() {
|
KHRDebug.glDebugMessageCallbackKHR(new GLDebugMessageKHRCallbackI() {
|
||||||
@Override
|
@Override
|
||||||
public void invoke(int source, int type, int id, int severity, int length, long message, long userParam) {
|
public void invoke(int source, int type, int id, int severity, int length, long message, long userParam) {
|
||||||
|
@ -313,6 +314,7 @@ public class PlatformRuntime {
|
||||||
|
|
||||||
GLES30.glEnable(KHRDebug.GL_DEBUG_OUTPUT_KHR);
|
GLES30.glEnable(KHRDebug.GL_DEBUG_OUTPUT_KHR);
|
||||||
GLES30.glEnable(KHRDebug.GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR);
|
GLES30.glEnable(KHRDebug.GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR);
|
||||||
|
}
|
||||||
|
|
||||||
logger.info("Initializing Audio...");
|
logger.info("Initializing Audio...");
|
||||||
PlatformAudio.platformInitialize();
|
PlatformAudio.platformInitialize();
|
||||||
|
@ -361,6 +363,7 @@ public class PlatformRuntime {
|
||||||
|
|
||||||
private static EnumPlatformANGLE requestedANGLEPlatform = EnumPlatformANGLE.DEFAULT;
|
private static EnumPlatformANGLE requestedANGLEPlatform = EnumPlatformANGLE.DEFAULT;
|
||||||
private static int requestedGLVersion = 300;
|
private static int requestedGLVersion = 300;
|
||||||
|
private static boolean requestedDisableKHRDebug = false;
|
||||||
|
|
||||||
public static void requestANGLE(EnumPlatformANGLE plaf) {
|
public static void requestANGLE(EnumPlatformANGLE plaf) {
|
||||||
requestedANGLEPlatform = plaf;
|
requestedANGLEPlatform = plaf;
|
||||||
|
@ -370,6 +373,10 @@ public class PlatformRuntime {
|
||||||
requestedGLVersion = i;
|
requestedGLVersion = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void requestDisableKHRDebug(boolean dis) {
|
||||||
|
requestedDisableKHRDebug = dis;
|
||||||
|
}
|
||||||
|
|
||||||
public static EnumPlatformANGLE getPlatformANGLE() {
|
public static EnumPlatformANGLE getPlatformANGLE() {
|
||||||
return rendererANGLEPlatform;
|
return rendererANGLEPlatform;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@ package net.lax1dude.eaglercraft.v1_8.internal;
|
||||||
import dev.onvoid.webrtc.*;
|
import dev.onvoid.webrtc.*;
|
||||||
import dev.onvoid.webrtc.internal.NativeLoader;
|
import dev.onvoid.webrtc.internal.NativeLoader;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EagUtils;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||||
import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||||
import net.lax1dude.eaglercraft.v1_8.sp.lan.LANPeerEvent;
|
import net.lax1dude.eaglercraft.v1_8.sp.lan.LANPeerEvent;
|
||||||
|
@ -257,14 +256,19 @@ public class PlatformWebRTC {
|
||||||
@Override
|
@Override
|
||||||
public void onStateChange() {
|
public void onStateChange() {
|
||||||
if (dataChannel != null && dataChannel.getState() == RTCDataChannelState.OPEN) {
|
if (dataChannel != null && dataChannel.getState() == RTCDataChannelState.OPEN) {
|
||||||
scheduleTask(-1l, () -> {
|
final Runnable[] retry = new Runnable[1];
|
||||||
while (true) {
|
final int[] loopCount = new int[1];
|
||||||
|
scheduleTask(-1l, retry[0] = () -> {
|
||||||
|
f: {
|
||||||
synchronized (lock1) {
|
synchronized (lock1) {
|
||||||
if (iceCandidates.isEmpty()) {
|
if (iceCandidates.isEmpty()) {
|
||||||
break;
|
break f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EagUtils.sleep(1);
|
if(++loopCount[0] < 5) {
|
||||||
|
scheduleTask(1000l, retry[0]);
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
synchronized (lock2) {
|
synchronized (lock2) {
|
||||||
clientDataChannelClosed = false;
|
clientDataChannelClosed = false;
|
||||||
|
@ -562,14 +566,20 @@ public class PlatformWebRTC {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDataChannel(RTCDataChannel dataChannel) {
|
public void onDataChannel(RTCDataChannel dataChannel) {
|
||||||
scheduleTask(-1l, () -> {
|
final Runnable[] retry = new Runnable[1];
|
||||||
while (true) {
|
final int[] loopCount = new int[1];
|
||||||
|
scheduleTask(-1l, retry[0] = () -> {
|
||||||
|
int i = 0;
|
||||||
|
f: {
|
||||||
synchronized (lock3) {
|
synchronized (lock3) {
|
||||||
if (iceCandidates.isEmpty()) {
|
if (iceCandidates.isEmpty()) {
|
||||||
break;
|
break f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EagUtils.sleep(1);
|
if(++loopCount[0] < 5) {
|
||||||
|
scheduleTask(1000l, retry[0]);
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (dataChannel == null) return;
|
if (dataChannel == null) return;
|
||||||
synchronized (fuckTeaVM) {
|
synchronized (fuckTeaVM) {
|
||||||
|
|
|
@ -87,6 +87,8 @@ public class LWJGLEntryPoint {
|
||||||
PlatformRuntime.requestGL(300);
|
PlatformRuntime.requestGL(300);
|
||||||
}else if(args[i].equalsIgnoreCase("gles=310")) {
|
}else if(args[i].equalsIgnoreCase("gles=310")) {
|
||||||
PlatformRuntime.requestGL(310);
|
PlatformRuntime.requestGL(310);
|
||||||
|
}else if(args[i].equalsIgnoreCase("disableKHRDebug")) {
|
||||||
|
PlatformRuntime.requestDisableKHRDebug(true);
|
||||||
}else {
|
}else {
|
||||||
EnumPlatformANGLE angle = EnumPlatformANGLE.fromId(args[i]);
|
EnumPlatformANGLE angle = EnumPlatformANGLE.fromId(args[i]);
|
||||||
if(angle != EnumPlatformANGLE.DEFAULT) {
|
if(angle != EnumPlatformANGLE.DEFAULT) {
|
||||||
|
|
|
@ -10,7 +10,7 @@ public class EaglercraftVersion {
|
||||||
/// Customize these to fit your fork:
|
/// Customize these to fit your fork:
|
||||||
|
|
||||||
public static final String projectForkName = "EaglercraftX";
|
public static final String projectForkName = "EaglercraftX";
|
||||||
public static final String projectForkVersion = "u40";
|
public static final String projectForkVersion = "u41";
|
||||||
public static final String projectForkVendor = "lax1dude";
|
public static final String projectForkVendor = "lax1dude";
|
||||||
|
|
||||||
public static final String projectForkURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8";
|
public static final String projectForkURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8";
|
||||||
|
@ -20,20 +20,20 @@ public class EaglercraftVersion {
|
||||||
public static final String projectOriginName = "EaglercraftX";
|
public static final String projectOriginName = "EaglercraftX";
|
||||||
public static final String projectOriginAuthor = "lax1dude";
|
public static final String projectOriginAuthor = "lax1dude";
|
||||||
public static final String projectOriginRevision = "1.8";
|
public static final String projectOriginRevision = "1.8";
|
||||||
public static final String projectOriginVersion = "u40";
|
public static final String projectOriginVersion = "u41";
|
||||||
|
|
||||||
public static final String projectOriginURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8"; // rest in peace
|
public static final String projectOriginURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8"; // rest in peace
|
||||||
|
|
||||||
// EPK Version Identifier
|
// EPK Version Identifier
|
||||||
|
|
||||||
public static final String EPKVersionIdentifier = "u40"; // Set to null to disable EPK version check
|
public static final String EPKVersionIdentifier = "u41"; // Set to null to disable EPK version check
|
||||||
|
|
||||||
// Updating configuration
|
// Updating configuration
|
||||||
|
|
||||||
public static final boolean enableUpdateService = true;
|
public static final boolean enableUpdateService = true;
|
||||||
|
|
||||||
public static final String updateBundlePackageName = "net.lax1dude.eaglercraft.v1_8.client";
|
public static final String updateBundlePackageName = "net.lax1dude.eaglercraft.v1_8.client";
|
||||||
public static final int updateBundlePackageVersionInt = 40;
|
public static final int updateBundlePackageVersionInt = 41;
|
||||||
|
|
||||||
public static final String updateLatestLocalStorageKey = "latestUpdate_" + updateBundlePackageName;
|
public static final String updateLatestLocalStorageKey = "latestUpdate_" + updateBundlePackageName;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,114 @@
|
||||||
|
package net.lax1dude.eaglercraft.v1_8.minecraft;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.client.gui.GuiButton;
|
||||||
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
|
import net.minecraft.client.resources.I18n;
|
||||||
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copyright (c) 2024 lax1dude. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||||
|
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||||
|
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class GuiScreenVideoSettingsWarning extends GuiScreen {
|
||||||
|
|
||||||
|
private final GuiScreen cont;
|
||||||
|
private final int mask;
|
||||||
|
private final List<String> messages = new ArrayList<>();
|
||||||
|
private int top = 0;
|
||||||
|
|
||||||
|
public static final int WARNING_VSYNC = 1;
|
||||||
|
public static final int WARNING_RENDER_DISTANCE = 2;
|
||||||
|
public static final int WARNING_FRAME_LIMIT = 4;
|
||||||
|
|
||||||
|
public GuiScreenVideoSettingsWarning(GuiScreen cont, int mask) {
|
||||||
|
this.cont = cont;
|
||||||
|
this.mask = mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initGui() {
|
||||||
|
messages.clear();
|
||||||
|
messages.add(EnumChatFormatting.RED + I18n.format("options.badVideoSettingsDetected.title"));
|
||||||
|
messages.add(null);
|
||||||
|
messages.add(EnumChatFormatting.GRAY + I18n.format("options.badVideoSettingsDetected.0"));
|
||||||
|
messages.add(EnumChatFormatting.GRAY + I18n.format("options.badVideoSettingsDetected.1"));
|
||||||
|
if((mask & WARNING_VSYNC) != 0) {
|
||||||
|
messages.add(null);
|
||||||
|
messages.add(I18n.format("options.badVideoSettingsDetected.vsync.0"));
|
||||||
|
messages.add(I18n.format("options.badVideoSettingsDetected.vsync.1"));
|
||||||
|
messages.add(I18n.format("options.badVideoSettingsDetected.vsync.2"));
|
||||||
|
messages.add(I18n.format("options.badVideoSettingsDetected.vsync.3"));
|
||||||
|
messages.add(I18n.format("options.badVideoSettingsDetected.vsync.4"));
|
||||||
|
}
|
||||||
|
if((mask & WARNING_RENDER_DISTANCE) != 0) {
|
||||||
|
messages.add(null);
|
||||||
|
messages.add(I18n.format("options.badVideoSettingsDetected.renderDistance.0", mc.gameSettings.renderDistanceChunks));
|
||||||
|
messages.add(I18n.format("options.badVideoSettingsDetected.renderDistance.1"));
|
||||||
|
messages.add(I18n.format("options.badVideoSettingsDetected.renderDistance.2"));
|
||||||
|
}
|
||||||
|
if((mask & WARNING_FRAME_LIMIT) != 0) {
|
||||||
|
messages.add(null);
|
||||||
|
messages.add(I18n.format("options.badVideoSettingsDetected.frameLimit.0", mc.gameSettings.limitFramerate));
|
||||||
|
}
|
||||||
|
int j = 0;
|
||||||
|
for(int i = 0, l = messages.size(); i < l; ++i) {
|
||||||
|
if(messages.get(i) != null) {
|
||||||
|
j += 9;
|
||||||
|
}else {
|
||||||
|
j += 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
top = this.height / 6 + j / -12;
|
||||||
|
j += top;
|
||||||
|
buttonList.clear();
|
||||||
|
buttonList.add(new GuiButton(0, this.width / 2 - 100, j + 16, I18n.format("options.badVideoSettingsDetected.fixSettings")));
|
||||||
|
buttonList.add(new GuiButton(1, this.width / 2 - 100, j + 40, I18n.format("options.badVideoSettingsDetected.continueAnyway")));
|
||||||
|
buttonList.add(new GuiButton(2, this.width / 2 - 100, j + 64, I18n.format("options.badVideoSettingsDetected.doNotShowAgain")));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void drawScreen(int par1, int par2, float par3) {
|
||||||
|
this.drawDefaultBackground();
|
||||||
|
int j = 0;
|
||||||
|
for(int i = 0, l = messages.size(); i < l; ++i) {
|
||||||
|
String str = messages.get(i);
|
||||||
|
if(str != null) {
|
||||||
|
this.drawCenteredString(fontRendererObj, str, this.width / 2, top + j, 16777215);
|
||||||
|
j += 9;
|
||||||
|
}else {
|
||||||
|
j += 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
super.drawScreen(par1, par2, par3);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void actionPerformed(GuiButton par1GuiButton) {
|
||||||
|
if(par1GuiButton.id == 0) {
|
||||||
|
mc.gameSettings.fixBadVideoSettings();
|
||||||
|
mc.gameSettings.saveOptions();
|
||||||
|
if((mask & WARNING_RENDER_DISTANCE) != 0) {
|
||||||
|
mc.renderGlobal.loadRenderers();
|
||||||
|
}
|
||||||
|
mc.displayGuiScreen(cont);
|
||||||
|
}else if(par1GuiButton.id == 1) {
|
||||||
|
mc.displayGuiScreen(cont);
|
||||||
|
}else if(par1GuiButton.id == 2) {
|
||||||
|
mc.gameSettings.hideVideoSettingsWarning = true;
|
||||||
|
mc.gameSettings.saveOptions();
|
||||||
|
mc.displayGuiScreen(cont);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -50,6 +50,7 @@ class LANClientPeer {
|
||||||
PlatformWebRTC.serverLANPeerICECandidates(clientId, candidates);
|
PlatformWebRTC.serverLANPeerICECandidates(clientId, candidates);
|
||||||
long millis = EagRuntime.steadyTimeMillis();
|
long millis = EagRuntime.steadyTimeMillis();
|
||||||
do {
|
do {
|
||||||
|
PlatformWebRTC.runScheduledTasks();
|
||||||
LANPeerEvent evt;
|
LANPeerEvent evt;
|
||||||
if((evt = PlatformWebRTC.serverLANGetEvent(clientId)) != null) {
|
if((evt = PlatformWebRTC.serverLANGetEvent(clientId)) != null) {
|
||||||
if(evt instanceof LANPeerEvent.LANPeerICECandidateEvent) {
|
if(evt instanceof LANPeerEvent.LANPeerICECandidateEvent) {
|
||||||
|
@ -78,6 +79,7 @@ class LANClientPeer {
|
||||||
PlatformWebRTC.serverLANPeerDescription(clientId, description);
|
PlatformWebRTC.serverLANPeerDescription(clientId, description);
|
||||||
long millis = EagRuntime.steadyTimeMillis();
|
long millis = EagRuntime.steadyTimeMillis();
|
||||||
do {
|
do {
|
||||||
|
PlatformWebRTC.runScheduledTasks();
|
||||||
LANPeerEvent evt;
|
LANPeerEvent evt;
|
||||||
if((evt = PlatformWebRTC.serverLANGetEvent(clientId)) != null) {
|
if((evt = PlatformWebRTC.serverLANGetEvent(clientId)) != null) {
|
||||||
if(evt instanceof LANPeerEvent.LANPeerDescriptionEvent) {
|
if(evt instanceof LANPeerEvent.LANPeerDescriptionEvent) {
|
||||||
|
@ -105,6 +107,7 @@ class LANClientPeer {
|
||||||
if(state == SENT_ICE_CANDIDATE) {
|
if(state == SENT_ICE_CANDIDATE) {
|
||||||
long millis = EagRuntime.steadyTimeMillis();
|
long millis = EagRuntime.steadyTimeMillis();
|
||||||
do {
|
do {
|
||||||
|
PlatformWebRTC.runScheduledTasks();
|
||||||
LANPeerEvent evt;
|
LANPeerEvent evt;
|
||||||
while((evt = PlatformWebRTC.serverLANGetEvent(clientId)) != null && evt instanceof LANPeerEvent.LANPeerICECandidateEvent) {
|
while((evt = PlatformWebRTC.serverLANGetEvent(clientId)) != null && evt instanceof LANPeerEvent.LANPeerICECandidateEvent) {
|
||||||
// skip ice candidates
|
// skip ice candidates
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
u40
|
u41
|
Binary file not shown.
Binary file not shown.
|
@ -314,7 +314,7 @@ public class BootMenuDatastore {
|
||||||
@Override
|
@Override
|
||||||
public void handleEvent() {
|
public void handleEvent() {
|
||||||
IDBCursor c = r.getResult();
|
IDBCursor c = r.getResult();
|
||||||
if(c == null || c.getKey() == null || c.getValue() == null) {
|
if(c == null || c.getKey() == null) {
|
||||||
cb.complete(res[0]);
|
cb.complete(res[0]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,10 +68,13 @@ public class PlatformApplication {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setClipboard(String text) {
|
public static void setClipboard(String text) {
|
||||||
|
boolean b = false;
|
||||||
try {
|
try {
|
||||||
setClipboard0(text);
|
b = setClipboard0(text);
|
||||||
}catch(Throwable t) {
|
}catch(Throwable t) {
|
||||||
PlatformRuntime.logger.error("Exception setting clipboard data");
|
PlatformRuntime.logger.error("Exception setting clipboard data");
|
||||||
|
}
|
||||||
|
if(!b) {
|
||||||
try {
|
try {
|
||||||
Window.prompt("Here is the text you're trying to copy:", text);
|
Window.prompt("Here is the text you're trying to copy:", text);
|
||||||
}catch(Throwable t2) {
|
}catch(Throwable t2) {
|
||||||
|
@ -80,17 +83,19 @@ public class PlatformApplication {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getClipboard() {
|
public static String getClipboard() {
|
||||||
|
String ret = null;
|
||||||
try {
|
try {
|
||||||
return getClipboard0();
|
ret = getClipboard0();
|
||||||
}catch(Throwable t) {
|
}catch(Throwable t) {
|
||||||
PlatformRuntime.logger.error("Exception getting clipboard data");
|
PlatformRuntime.logger.error("Exception getting clipboard data");
|
||||||
|
}
|
||||||
|
if(ret == null) {
|
||||||
try {
|
try {
|
||||||
String ret = Window.prompt("Please enter the text to paste:");
|
ret = Window.prompt("Please enter the text to paste:");
|
||||||
return ret != null ? ret : "";
|
|
||||||
}catch(Throwable t2) {
|
}catch(Throwable t2) {
|
||||||
return "";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return ret != null ? ret : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSFunctor
|
@JSFunctor
|
||||||
|
@ -114,11 +119,11 @@ public class PlatformApplication {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSBody(params = { "cb" }, script = "if(!navigator.clipboard) { cb(prompt(\"Please enter the text to paste:\") || \"\"); } else if (!navigator.clipboard.readText) cb(\"\"); else navigator.clipboard.readText().then(function(s) { cb(s); }, function(s) { cb(\"\"); });")
|
@JSBody(params = { "cb" }, script = "if(!navigator.clipboard) { cb(null); } else if (!navigator.clipboard.readText) cb(null); else navigator.clipboard.readText().then(function(s) { cb(s || null); }, function() { cb(null); });")
|
||||||
private static native void getClipboard1(StupidFunctionResolveString cb);
|
private static native void getClipboard1(StupidFunctionResolveString cb);
|
||||||
|
|
||||||
@JSBody(params = { "str" }, script = "if(navigator.clipboard) navigator.clipboard.writeText(str);")
|
@JSBody(params = { "str" }, script = "if(navigator.clipboard) { navigator.clipboard.writeText(str); return true; } else { return false; }")
|
||||||
private static native void setClipboard0(String str);
|
private static native boolean setClipboard0(String str);
|
||||||
|
|
||||||
public static void setLocalStorage(String name, byte[] data) {
|
public static void setLocalStorage(String name, byte[] data) {
|
||||||
setLocalStorage(name, data, true);
|
setLocalStorage(name, data, true);
|
||||||
|
|
|
@ -252,7 +252,7 @@ public class PlatformRuntime {
|
||||||
}
|
}
|
||||||
|
|
||||||
useVisualViewport = false;
|
useVisualViewport = false;
|
||||||
if(isVisualViewportSupported(System.currentTimeMillis())) {
|
if(isVisualViewportSupported()) {
|
||||||
if(isEmbeddedInBody) {
|
if(isEmbeddedInBody) {
|
||||||
useVisualViewport = true;
|
useVisualViewport = true;
|
||||||
}else {
|
}else {
|
||||||
|
@ -525,8 +525,8 @@ public class PlatformRuntime {
|
||||||
return EnumPlatformOS.getFromUA(getUserAgentString());
|
return EnumPlatformOS.getFromUA(getUserAgentString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSBody(params = { "ts" }, script = "if(ts > 1728322572561 && window[decodeURIComponent(\"%6C%6F%63%61%74%69%6F%6E\")][decodeURIComponent(\"%68%6F%73%74%6E%61%6D%65\")] === decodeURIComponent(\"%65%61%67%6C%65%72%63%72%61%66%74%2E%64%65%76\")) setTimeout(function() { var i = 1; while(i > 0) { ++i; } }, 353000); return (typeof visualViewport !== \"undefined\");")
|
@JSBody(params = { }, script = "return (typeof visualViewport !== \"undefined\");")
|
||||||
private static native boolean isVisualViewportSupported(double ts);
|
private static native boolean isVisualViewportSupported();
|
||||||
|
|
||||||
@JSBody(params = { }, script = "return visualViewport;")
|
@JSBody(params = { }, script = "return visualViewport;")
|
||||||
static native VisualViewport getVisualViewport();
|
static native VisualViewport getVisualViewport();
|
||||||
|
|
|
@ -279,6 +279,10 @@ public class EarlyLoadScreen {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void loadFinal(byte[] image) {
|
public static void loadFinal(byte[] image) {
|
||||||
|
ImageData img = PlatformAssets.loadImageFile(image);
|
||||||
|
if(img == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
finalTexture = _wglGenTextures();
|
finalTexture = _wglGenTextures();
|
||||||
_wglActiveTexture(GL_TEXTURE0);
|
_wglActiveTexture(GL_TEXTURE0);
|
||||||
_wglBindTexture(GL_TEXTURE_2D, finalTexture);
|
_wglBindTexture(GL_TEXTURE_2D, finalTexture);
|
||||||
|
@ -286,11 +290,10 @@ public class EarlyLoadScreen {
|
||||||
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||||
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||||
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||||
ImageData img = PlatformAssets.loadImageFile(image);
|
IntBuffer upload = PlatformRuntime.allocateIntBuffer(img.width * img.height);
|
||||||
IntBuffer upload = PlatformRuntime.allocateIntBuffer(256*256);
|
|
||||||
upload.put(img.pixels);
|
upload.put(img.pixels);
|
||||||
upload.flip();
|
upload.flip();
|
||||||
_wglTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, upload);
|
_wglTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, img.width, img.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, upload);
|
||||||
PlatformRuntime.freeIntBuffer(upload);
|
PlatformRuntime.freeIntBuffer(upload);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -290,7 +290,7 @@ public class IndexedDBFilesystem implements IEaglerFilesystem {
|
||||||
@Override
|
@Override
|
||||||
public void handleEvent() {
|
public void handleEvent() {
|
||||||
IDBCursor c = r.getResult();
|
IDBCursor c = r.getResult();
|
||||||
if(c == null || c.getKey() == null || c.getValue() == null) {
|
if(c == null || c.getKey() == null) {
|
||||||
cb.complete(res[0]);
|
cb.complete(res[0]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user