From 4fc4accb6ef1f21fbd55c24bcb7e7385a65754cb Mon Sep 17 00:00:00 2001 From: Christian Date: Fri, 13 Sep 2013 19:04:25 -0500 Subject: [PATCH] Fix sidedness derp in LanguageRegistry. --- fml/client/cpw/mods/fml/client/FMLClientHandler.java | 6 ++++++ fml/common/cpw/mods/fml/common/FMLCommonHandler.java | 6 ++++++ fml/common/cpw/mods/fml/common/IFMLSidedHandler.java | 2 ++ .../cpw/mods/fml/common/registry/LanguageRegistry.java | 3 ++- fml/common/cpw/mods/fml/server/FMLServerHandler.java | 5 +++++ 5 files changed, 21 insertions(+), 1 deletion(-) diff --git a/fml/client/cpw/mods/fml/client/FMLClientHandler.java b/fml/client/cpw/mods/fml/client/FMLClientHandler.java index c9d493459..694e41402 100644 --- a/fml/client/cpw/mods/fml/client/FMLClientHandler.java +++ b/fml/client/cpw/mods/fml/client/FMLClientHandler.java @@ -606,4 +606,10 @@ public class FMLClientHandler implements IFMLSidedHandler { return resourcePackMap.get(modId); } + + @Override + public String getCurrentLanguage() + { + return client.func_135016_M().func_135041_c().func_135034_a(); + } } diff --git a/fml/common/cpw/mods/fml/common/FMLCommonHandler.java b/fml/common/cpw/mods/fml/common/FMLCommonHandler.java index d19b213c5..5230df069 100644 --- a/fml/common/cpw/mods/fml/common/FMLCommonHandler.java +++ b/fml/common/cpw/mods/fml/common/FMLCommonHandler.java @@ -496,4 +496,10 @@ public class FMLCommonHandler { sidedDelegate.updateResourcePackList(); } + + public String getCurrentLanguage() + { + + return sidedDelegate.getCurrentLanguage(); + } } diff --git a/fml/common/cpw/mods/fml/common/IFMLSidedHandler.java b/fml/common/cpw/mods/fml/common/IFMLSidedHandler.java index c105efb79..2e5f4a2e4 100644 --- a/fml/common/cpw/mods/fml/common/IFMLSidedHandler.java +++ b/fml/common/cpw/mods/fml/common/IFMLSidedHandler.java @@ -66,4 +66,6 @@ public interface IFMLSidedHandler void addModAsResource(ModContainer container); void updateResourcePackList(); + + String getCurrentLanguage(); } diff --git a/fml/common/cpw/mods/fml/common/registry/LanguageRegistry.java b/fml/common/cpw/mods/fml/common/registry/LanguageRegistry.java index 54bd3f645..25a409a84 100644 --- a/fml/common/cpw/mods/fml/common/registry/LanguageRegistry.java +++ b/fml/common/cpw/mods/fml/common/registry/LanguageRegistry.java @@ -23,6 +23,7 @@ import java.util.logging.Level; import com.google.common.base.Charsets; +import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.ModContainer; @@ -46,7 +47,7 @@ public class LanguageRegistry public String getStringLocalization(String key) { - return getStringLocalization(key, Minecraft.func_71410_x().func_135016_M().func_135041_c().func_135034_a()); + return getStringLocalization(key, FMLCommonHandler.instance().getCurrentLanguage()); } public String getStringLocalization(String key, String lang) diff --git a/fml/common/cpw/mods/fml/server/FMLServerHandler.java b/fml/common/cpw/mods/fml/server/FMLServerHandler.java index f82f97334..4c59cab6b 100644 --- a/fml/common/cpw/mods/fml/server/FMLServerHandler.java +++ b/fml/common/cpw/mods/fml/server/FMLServerHandler.java @@ -260,4 +260,9 @@ public class FMLServerHandler implements IFMLSidedHandler { } + @Override + public String getCurrentLanguage() + { + return "en_US"; + } }