aboutsummaryrefslogtreecommitdiff
path: root/common/src/main/java/dev/isxander/yacl/mixin
diff options
context:
space:
mode:
authorisXander <xandersmith2008@gmail.com>2023-05-21 14:36:37 +0100
committerisXander <xandersmith2008@gmail.com>2023-05-21 14:36:37 +0100
commitc84415116455d108ad07fc8dd6232c9acc94c40f (patch)
tree9c6a20b611e45eedeb512b8294f7147575d56af9 /common/src/main/java/dev/isxander/yacl/mixin
parent21afea0da3956f2d8cca81a54fa9820152e0c077 (diff)
downloadYetAnotherConfigLib-c84415116455d108ad07fc8dd6232c9acc94c40f.tar.gz
YetAnotherConfigLib-c84415116455d108ad07fc8dd6232c9acc94c40f.tar.bz2
YetAnotherConfigLib-c84415116455d108ad07fc8dd6232c9acc94c40f.zip
Automatic WebP frame duration detection
Diffstat (limited to 'common/src/main/java/dev/isxander/yacl/mixin')
-rw-r--r--common/src/main/java/dev/isxander/yacl/mixin/MinecraftMixin.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/common/src/main/java/dev/isxander/yacl/mixin/MinecraftMixin.java b/common/src/main/java/dev/isxander/yacl/mixin/MinecraftMixin.java
new file mode 100644
index 0000000..c33eed7
--- /dev/null
+++ b/common/src/main/java/dev/isxander/yacl/mixin/MinecraftMixin.java
@@ -0,0 +1,16 @@
+package dev.isxander.yacl.mixin;
+
+import dev.isxander.yacl.gui.ImageRenderer;
+import net.minecraft.client.Minecraft;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Inject;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+
+@Mixin(Minecraft.class)
+public class MinecraftMixin {
+ @Inject(method = "close", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/telemetry/ClientTelemetryManager;close()V"))
+ private void closeImages(CallbackInfo ci) {
+ ImageRenderer.closeAll();
+ }
+}