Fix sidedness derp in LanguageRegistry.

This commit is contained in:
Christian 2013-09-13 19:04:25 -05:00
parent 9387bae26b
commit 4fc4accb6e
5 changed files with 21 additions and 1 deletions

View file

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

View file

@ -496,4 +496,10 @@ public class FMLCommonHandler
{
sidedDelegate.updateResourcePackList();
}
public String getCurrentLanguage()
{
return sidedDelegate.getCurrentLanguage();
}
}

View file

@ -66,4 +66,6 @@ public interface IFMLSidedHandler
void addModAsResource(ModContainer container);
void updateResourcePackList();
String getCurrentLanguage();
}

View file

@ -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)

View file

@ -260,4 +260,9 @@ public class FMLServerHandler implements IFMLSidedHandler
{
}
@Override
public String getCurrentLanguage()
{
return "en_US";
}
}