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(); } }