diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-10-14 23:19:53 +0200 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-10-14 23:19:53 +0200 |
| commit | fc74db9ce60afd2c18919531f132ef2f4e56fa80 (patch) | |
| tree | 40500c4ad9ec9cfbcc03bf4a4364d406bff12e1e /src/main | |
| parent | 733f01be8c2ca986e594816e73cb89ee1c8d105d (diff) | |
| download | Firmament-fc74db9ce60afd2c18919531f132ef2f4e56fa80.tar.gz Firmament-fc74db9ce60afd2c18919531f132ef2f4e56fa80.tar.bz2 Firmament-fc74db9ce60afd2c18919531f132ef2f4e56fa80.zip | |
fix(dev): scheduleStop identifier being called multiple times
Diffstat (limited to 'src/main')
| -rw-r--r-- | src/main/java/moe/nea/firmament/mixins/devenv/IdentifyStopperPatch.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/main/java/moe/nea/firmament/mixins/devenv/IdentifyStopperPatch.java b/src/main/java/moe/nea/firmament/mixins/devenv/IdentifyStopperPatch.java index fac0688..cedfb95 100644 --- a/src/main/java/moe/nea/firmament/mixins/devenv/IdentifyStopperPatch.java +++ b/src/main/java/moe/nea/firmament/mixins/devenv/IdentifyStopperPatch.java @@ -3,14 +3,19 @@ package moe.nea.firmament.mixins.devenv; import net.minecraft.client.MinecraftClient; import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(MinecraftClient.class) public class IdentifyStopperPatch { - @Inject(method = "scheduleStop", at = @At("HEAD")) - private void onStop(CallbackInfo ci) { - Thread.dumpStack(); - } + @Shadow + private volatile boolean running; + + @Inject(method = "scheduleStop", at = @At("HEAD")) + private void onStop(CallbackInfo ci) { + if (this.running) + Thread.dumpStack(); + } } |
