Fix MixinThreadExecutor

This commit is contained in:
mcrcortex
2025-01-28 03:14:14 +10:00
parent 1048d38b4d
commit aac3db90d3

View File

@@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
public abstract class MixinThreadExecutor {
@Shadow public static boolean isMemoryError(Throwable exception){return false;};
@Redirect(method = "executeTask", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/thread/ThreadExecutor;isMemoryError(Ljava/lang/Throwable;)Z"), remap = false)
@Redirect(method = "executeTask", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/thread/ThreadExecutor;isMemoryError(Ljava/lang/Throwable;)Z"))
private boolean voxy$forceCrashOnError(Throwable exception) {
if (exception instanceof LoadException le) {
if (le.getCause() instanceof RuntimeException cause) {