From fc7652d1edf0036f9015a43ba9f79c5817d9d06b Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Thu, 16 May 2024 18:59:22 +0200 Subject: [PATCH] fixed #926 --- changelog.md | 1 + .../src/main/java/net/mca/mixin/MixinTranslatableText.java | 2 +- .../java/net/mca/mixin/client/MixinTranslationStorage.java | 7 ++----- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/changelog.md b/changelog.md index c163b023f3..3c379ff328 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,7 @@ # 7.5.17 * Now its compatible with Cobblemon! +* Fixed TTS again! # 7.5.16 diff --git a/common/src/main/java/net/mca/mixin/MixinTranslatableText.java b/common/src/main/java/net/mca/mixin/MixinTranslatableText.java index 93432a64cb..3aa6c2a91a 100644 --- a/common/src/main/java/net/mca/mixin/MixinTranslatableText.java +++ b/common/src/main/java/net/mca/mixin/MixinTranslatableText.java @@ -11,7 +11,7 @@ @Mixin(TranslatableTextContent.class) public class MixinTranslatableText { @Inject(method = "updateTranslations()V", at = @At("TAIL")) - private void updateTranslations(CallbackInfo ci) { + private void mca$updateTranslations(CallbackInfo ci) { if (CommonSpeechManager.INSTANCE.lastResolvedKey != null) { CommonSpeechManager.INSTANCE.translations.put((TextContent)this, CommonSpeechManager.INSTANCE.lastResolvedKey); } diff --git a/common/src/main/java/net/mca/mixin/client/MixinTranslationStorage.java b/common/src/main/java/net/mca/mixin/client/MixinTranslationStorage.java index ee719702e9..6801571c67 100644 --- a/common/src/main/java/net/mca/mixin/client/MixinTranslationStorage.java +++ b/common/src/main/java/net/mca/mixin/client/MixinTranslationStorage.java @@ -45,11 +45,8 @@ abstract class MixinTranslationStorage extends Language { if (unpooled != null) { CommonSpeechManager.INSTANCE.lastResolvedKey = unpooled.getLeft(); info.setReturnValue(get(unpooled.getLeft(), fallback)); - } else { - CommonSpeechManager.INSTANCE.lastResolvedKey = null; - if (!key.equals(modifiedKey)) { - info.setReturnValue(get(modifiedKey, fallback)); - } + } else if (!key.equals(modifiedKey)) { + info.setReturnValue(get(modifiedKey, fallback)); } }