Fix exit on main thread deadlock (#1256)
This commit is contained in:
parent
7554962fa9
commit
0f2ca4bf18
|
@ -0,0 +1,17 @@
|
|||
package io.izzel.arclight.common.mixin.core.server;
|
||||
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import org.spigotmc.AsyncCatcher;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@Mixin(targets = "net/minecraft/server/Main$1")
|
||||
public class Main_ServerShutdownThreadMixin {
|
||||
|
||||
@Redirect(method = "run", at = @At(value = "INVOKE", remap = true, target = "Lnet/minecraft/server/MinecraftServer;halt(Z)V"))
|
||||
private void arclight$shutdown(MinecraftServer instance, boolean b) {
|
||||
AsyncCatcher.enabled = false;
|
||||
instance.close();
|
||||
}
|
||||
}
|
|
@ -49,6 +49,7 @@
|
|||
"network.rcon.RConConsoleSourceMixin",
|
||||
"server.BootstrapMixin",
|
||||
"server.CustomServerBossInfoMixin",
|
||||
"server.Main_ServerShutdownThreadMixin",
|
||||
"server.MinecraftServerMixin",
|
||||
"server.PlayerAdvancementsMixin",
|
||||
"server.ServerFunctionManagerMixin",
|
||||
|
|
|
@ -202,6 +202,7 @@ task runProdServer(type: JavaExec) {
|
|||
classpath = files(tasks.jar)
|
||||
systemProperties 'terminal.ansi': 'true'
|
||||
systemProperties 'mixin.debug.export': 'true'
|
||||
systemProperties 'mixin.dumpTargetOnFailure': 'true'
|
||||
systemProperties 'arclight.alwaysExtract': 'true'
|
||||
systemProperties 'arclight.remapper.dump': './.mixin.out/plugin_classes'
|
||||
workingDir System.env.ARCLIGHT_PROD_DIR ?: file('run_prod')
|
||||
|
|
Loading…
Reference in New Issue
Block a user