diff --git a/lwjgl-rundir/resources/credits.txt b/lwjgl-rundir/resources/credits.txt index 57090e7..e21104b 100644 --- a/lwjgl-rundir/resources/credits.txt +++ b/lwjgl-rundir/resources/credits.txt @@ -1,4 +1,15 @@ +§lCHANGES §lIN §lSERVICE §lPACK §l#2:§r + + - improved resource packs §4(by §4ayunami2000)§r + - improved the FPS even more + - improved voice chat reliability + - improved shared worlds reliability + - backported X's vanilla world export + - backported X's vsync mode + +Release date: §912/14/2024§r + §lCHANGES §lIN §lSERVICE §lPACK §l#1:§r - resource packs §4(by §4ayunami2000)§r diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/adapter/vfs/VFile.java b/src/lwjgl/java/net/lax1dude/eaglercraft/adapter/vfs/VFile.java index ea3d5ae..280e5dd 100644 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/adapter/vfs/VFile.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/adapter/vfs/VFile.java @@ -45,7 +45,7 @@ public class VFile extends File { public String getAllChars() { try { - return Files.readString(this.toPath(), StandardCharsets.UTF_8); + return new String(Files.readAllBytes(this.toPath()), StandardCharsets.UTF_8); } catch (IOException e) { return null; } @@ -57,8 +57,9 @@ public class VFile extends File { public boolean setAllBytes(byte[] bytes) { try { - if (this.getParentFile() != null) { - this.getParentFile().mkdirs(); + File f = this.getParentFile(); + if (f != null) { + f.mkdirs(); } Files.write(this.toPath(), bytes); return true; diff --git a/src/main/java/net/lax1dude/eaglercraft/ConfigConstants.java b/src/main/java/net/lax1dude/eaglercraft/ConfigConstants.java index cd92e62..c754950 100644 --- a/src/main/java/net/lax1dude/eaglercraft/ConfigConstants.java +++ b/src/main/java/net/lax1dude/eaglercraft/ConfigConstants.java @@ -6,12 +6,10 @@ public class ConfigConstants { public static boolean profanity = false; - public static final String version = "1.5.2-sp1.01"; + public static final String version = "1.5.2-sp2"; public static final String mainMenuString = "eaglercraft " + version; public static final String forkMe = null; - - public static final boolean html5build = true; public static String ayonullTitle = null; public static String ayonullLink = null; diff --git a/src/main/java/net/lax1dude/eaglercraft/IntegratedServerLAN.java b/src/main/java/net/lax1dude/eaglercraft/IntegratedServerLAN.java index b943514..6b59124 100644 --- a/src/main/java/net/lax1dude/eaglercraft/IntegratedServerLAN.java +++ b/src/main/java/net/lax1dude/eaglercraft/IntegratedServerLAN.java @@ -273,7 +273,6 @@ public class IntegratedServerLAN { System.out.println("LAN client '" + clientId + "' disconnected"); disconnect(); }else { - System.out.println(evt.getClass().getSimpleName()); switch(state) { case SENT_DESCRIPTION:{ if(evt instanceof LANPeerEvent.LANPeerICECandidateEvent) { diff --git a/src/teavm/java/net/lax1dude/eaglercraft/adapter/EaglerAdapterImpl2.java b/src/teavm/java/net/lax1dude/eaglercraft/adapter/EaglerAdapterImpl2.java index 9622f64..4ccba1a 100644 --- a/src/teavm/java/net/lax1dude/eaglercraft/adapter/EaglerAdapterImpl2.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/adapter/EaglerAdapterImpl2.java @@ -563,6 +563,9 @@ public class EaglerAdapterImpl2 { @JSBody(params = { }, script = "return {antialias: false, depth: true, powerPreference: \"high-performance\", desynchronized: true, preserveDrawingBuffer: false, premultipliedAlpha: false, alpha: false};") public static native JSObject youEagler(); + @JSBody(params = { }, script = "return { willReadFrequently: true };") + public static native JSObject youEagler2(); + public static final int _wGL_TEXTURE_2D = TEXTURE_2D; public static final int _wGL_DEPTH_TEST = DEPTH_TEST; public static final int _wGL_LEQUAL = LEQUAL; @@ -1063,7 +1066,7 @@ public class EaglerAdapterImpl2 { imageLoadCanvas.setHeight(toLoad.getHeight()); } if(imageLoadContext == null) { - imageLoadContext = (CanvasRenderingContext2D) imageLoadCanvas.getContext("2d"); + imageLoadContext = (CanvasRenderingContext2D) imageLoadCanvas.getContext("2d", youEagler2()); setImageSmoothingMode(imageLoadContext, false); } imageLoadContext.clearRect(0, 0, toLoad.getWidth(), toLoad.getHeight()); @@ -1942,7 +1945,7 @@ public class EaglerAdapterImpl2 { HTMLCanvasElement retardedCanvas = (HTMLCanvasElement)doc.createElement("canvas"); retardedCanvas.setWidth(canvas.getWidth()); retardedCanvas.setHeight(canvas.getHeight()); - CanvasRenderingContext2D cc = (CanvasRenderingContext2D)retardedCanvas.getContext("2d"); + CanvasRenderingContext2D cc = (CanvasRenderingContext2D)retardedCanvas.getContext("2d", youEagler2()); setImageSmoothingMode(cc, false); cc.setFillStyle("black"); cc.fillRect(0, 0, canvas.getWidth(), canvas.getHeight()); diff --git a/zip-generator/Offline_Download_Version_Template.html b/zip-generator/Offline_Download_Version_Template.html index 3fe69ff..4a8df1a 100644 --- a/zip-generator/Offline_Download_Version_Template.html +++ b/zip-generator/Offline_Download_Version_Template.html @@ -162,7 +162,7 @@ function countdown() {
-

Eaglercraft 1.5.2 Service Pack #1

+

Eaglercraft 1.5.2 Service Pack #2

the version you are currently using is from ${date}

(Game will launch in 5)