diff --git a/gradle.properties b/gradle.properties index 4812a72..c070eba 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ loader_version=0.15.11 fabric_version=0.92.1+1.20.1 # Mod Properties -mod_version=1.7+1.20.1 +mod_version=1.7.1+1.20.1 maven_group=jerozgen archives_base_name=language-reload diff --git a/src/main/java/jerozgen/languagereload/mixin/MinecraftClientMixin.java b/src/main/java/jerozgen/languagereload/mixin/MinecraftClientMixin.java index e50813b..8add4de 100644 --- a/src/main/java/jerozgen/languagereload/mixin/MinecraftClientMixin.java +++ b/src/main/java/jerozgen/languagereload/mixin/MinecraftClientMixin.java @@ -27,7 +27,10 @@ private static List addFallbackTranslationsToSearchTooltips(ItemStack inst if (Config.getInstance() == null) return original; if (!Config.getInstance().multilingualItemSearch) return original; - var translationStorage = ((ILanguage) Language.getInstance()).languagereload_getTranslationStorage(); + var language = Language.getInstance(); + if (language == null) return original; + + var translationStorage = ((ILanguage) language).languagereload_getTranslationStorage(); if (translationStorage == null) return original; var result = new ArrayList<>(original); diff --git a/src/main/java/jerozgen/languagereload/mixin/TranslatableTextContentMixin.java b/src/main/java/jerozgen/languagereload/mixin/TranslatableTextContentMixin.java index e2585ef..e546c73 100644 --- a/src/main/java/jerozgen/languagereload/mixin/TranslatableTextContentMixin.java +++ b/src/main/java/jerozgen/languagereload/mixin/TranslatableTextContentMixin.java @@ -45,6 +45,8 @@ List getOverriddenTranslations() { if (!Config.getInstance().multilingualItemSearch) return null; var language = Language.getInstance(); + if (language == null) return null; + var translationStorage = ((ILanguage) language).languagereload_getTranslationStorage(); if (translationStorage == null) return null;