From 74c2c28a66bf55f378b51b522e3eca037079cbdb Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Sat, 6 May 2023 11:17:46 -0400 Subject: [PATCH 1/6] Avoid hard crash if AT fails to apply --- .../src/main/java/org/embeddedt/modernfix/ModernFix.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/org/embeddedt/modernfix/ModernFix.java b/common/src/main/java/org/embeddedt/modernfix/ModernFix.java index 6f10dc9a..18f99171 100644 --- a/common/src/main/java/org/embeddedt/modernfix/ModernFix.java +++ b/common/src/main/java/org/embeddedt/modernfix/ModernFix.java @@ -31,7 +31,12 @@ public class ModernFix { static { if(ModernFixMixinPlugin.instance.isOptionEnabled("perf.dedicated_reload_executor.ReloadExecutor")) { - resourceReloadService = Util.makeExecutor("ResourceReload"); + try { + resourceReloadService = Util.makeExecutor("ResourceReload"); + } catch(Throwable e) { + LOGGER.error("Error creating resource reload service, using fallback", e); + resourceReloadService = Util.backgroundExecutor(); + } } else { resourceReloadService = Util.backgroundExecutor(); } From 48f9ad86f082d71624aa630d49d69b7a0faa9f4e Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Sat, 6 May 2023 11:20:54 -0400 Subject: [PATCH 2/6] Prevent immediate crash when TextureAtlasSprite constructor throws Fixes #79 --- .../modernfix/platform/forge/ModernFixPlatformHooksImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/forge/src/main/java/org/embeddedt/modernfix/platform/forge/ModernFixPlatformHooksImpl.java b/forge/src/main/java/org/embeddedt/modernfix/platform/forge/ModernFixPlatformHooksImpl.java index d2c84cf8..f8eb19e6 100644 --- a/forge/src/main/java/org/embeddedt/modernfix/platform/forge/ModernFixPlatformHooksImpl.java +++ b/forge/src/main/java/org/embeddedt/modernfix/platform/forge/ModernFixPlatformHooksImpl.java @@ -118,7 +118,10 @@ public class ModernFixPlatformHooksImpl { try { return (TextureAtlasSprite)textureAtlasSpriteConstruct.invokeExact(atlasTexture, textureInfo, mipmapLevel, atlasWidth, atlasHeight, spriteX, spriteY, image); } catch(Throwable e) { - throw new AssertionError("MethodHandle failed", e); + if(e instanceof RuntimeException) + throw (RuntimeException)e; + else + throw new RuntimeException("TextureAtlasSprite construction failed", e); } } } From 8beadf828c273317d7cde52c9520fda5f782db6e Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Sat, 6 May 2023 11:22:27 -0400 Subject: [PATCH 3/6] Add dev builds to README [skip ci] --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index e1543d82..5408ed37 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,13 @@ A performance mod for modern Minecraft that significantly improves launch times, Some fixes are based on prior work in various Forge PRs (check commit history and/or code comments). The config system is directly derived from Sodium and used under the terms of the LGPL-3.0 license. +## Development builds (generally stable, but may occasionally have bugs) + +1.16.5, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/main/Package.zip +1.18.2, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/1.18/Package.zip +1.19.2, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/1.19.2/Package.zip +1.19.4, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/1.19.4/Package.zip + ------------ ![YourKit logo](https://www.yourkit.com/images/yklogo.png) From 218c3e84d39d11386c5af16456f561e1a0262527 Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Sat, 6 May 2023 11:22:50 -0400 Subject: [PATCH 4/6] Fix GitHub markdown formatting being different [skip ci] --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5408ed37..f98eb2cf 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,10 @@ is directly derived from Sodium and used under the terms of the LGPL-3.0 license ## Development builds (generally stable, but may occasionally have bugs)  -1.16.5, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/main/Package.zip -1.18.2, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/1.18/Package.zip -1.19.2, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/1.19.2/Package.zip -1.19.4, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/1.19.4/Package.zip +- 1.16.5, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/main/Package.zip +- 1.18.2, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/1.18/Package.zip +- 1.19.2, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/1.19.2/Package.zip +- 1.19.4, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/1.19.4/Package.zip ------------ From f506fc671a5c4a80da932516bfd663bee975f430 Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Sat, 6 May 2023 11:23:10 -0400 Subject: [PATCH 5/6] Remove blank space [skip ci] --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index f98eb2cf..6eee1d0d 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ Some fixes are based on prior work in various Forge PRs (check commit history an is directly derived from Sodium and used under the terms of the LGPL-3.0 license. ## Development builds (generally stable, but may occasionally have bugs) - - 1.16.5, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/main/Package.zip - 1.18.2, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/1.18/Package.zip - 1.19.2, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/1.19.2/Package.zip From d4fec79e5535be4eebb7b3eda5bfb4a960409ae1 Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Sat, 6 May 2023 11:43:11 -0400 Subject: [PATCH 6/6] Change texture loading mixin priority to prevent FAPI conflicts --- .../mixin/perf/faster_texture_loading/TextureAtlasMixin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/org/embeddedt/modernfix/common/mixin/perf/faster_texture_loading/TextureAtlasMixin.java b/common/src/main/java/org/embeddedt/modernfix/common/mixin/perf/faster_texture_loading/TextureAtlasMixin.java index 7de5e189..0c9e7199 100644 --- a/common/src/main/java/org/embeddedt/modernfix/common/mixin/perf/faster_texture_loading/TextureAtlasMixin.java +++ b/common/src/main/java/org/embeddedt/modernfix/common/mixin/perf/faster_texture_loading/TextureAtlasMixin.java @@ -25,7 +25,7 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentLinkedQueue; -@Mixin(TextureAtlas.class) +@Mixin(value = TextureAtlas.class, priority = 1500) @ClientOnlyMixin public abstract class TextureAtlasMixin { @Shadow protected abstract ResourceLocation getResourceLocation(ResourceLocation location);