mirror of
https://github.com/FabricMC/fabric.git
synced 2025-04-11 22:45:38 -04:00
Fix client test random crashes (#4224)
* Fix client test random crashes * Improve * Even easier
This commit is contained in:
parent
8eedec2580
commit
8ca5486fd5
1 changed files with 8 additions and 0 deletions
|
@ -16,6 +16,8 @@
|
|||
|
||||
package net.fabricmc.fabric.test.base.client.mixin;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
|
||||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
|
@ -32,4 +34,10 @@ public abstract class MinecraftDedicatedServerMixin {
|
|||
// Capture the server instance once the server is ready to be connected to
|
||||
TestDedicatedServer.DEDICATED_SERVER_REF.set((MinecraftDedicatedServer) (Object) this);
|
||||
}
|
||||
|
||||
// Don't call shutdownExecutors as we are running the dedi server within the client process.
|
||||
@WrapOperation(method = "shutdown", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Util;shutdownExecutors()V"))
|
||||
private void dontStopExecutors(Operation<Void> original) {
|
||||
// Never needed, as this is a client mixin.
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue