Merge remote-tracking branch 'origin/main' into 1.18

This commit is contained in:
embeddedt 2023-05-06 11:45:06 -04:00
commit a139b273c9
No known key found for this signature in database
GPG Key ID: A69433EC199B5613
4 changed files with 17 additions and 3 deletions

View File

@ -5,6 +5,12 @@ 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)

View File

@ -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();
}

View File

@ -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);

View File

@ -110,7 +110,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);
}
}
}