mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-16 10:34:49 +00:00
Fix language registry additions, closes #113
This commit is contained in:
1 parent
a08b5b19d5
commit
15ee8bf5a1
1 file changed
+7
-7
@@ -25,7 +25,7 @@ public class LanguageRegistry
|
|||||||
|
|
||||||
public String getStringLocalization(String key)
|
public String getStringLocalization(String key)
|
||||||
{
|
{
|
||||||
return getStringLocalization(key, StringTranslate.getInstance().getCurrentLanguage());
|
return getStringLocalization(key, StringTranslate.func_74808_a().func_74811_c());
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getStringLocalization(String key, String lang)
|
public String getStringLocalization(String key, String lang)
|
||||||
@@ -74,9 +74,9 @@ public class LanguageRegistry
|
|||||||
public static void reloadLanguageTable()
|
public static void reloadLanguageTable()
|
||||||
{
|
{
|
||||||
// reload language table by forcing lang to null and reloading the properties file
|
// reload language table by forcing lang to null and reloading the properties file
|
||||||
String lang = StringTranslate.getInstance().getCurrentLanguage();
|
String lang = StringTranslate.func_74808_a().func_74811_c();
|
||||||
StringTranslate.getInstance().currentLanguage = null;
|
StringTranslate.func_74808_a().field_74813_d = null;
|
||||||
StringTranslate.getInstance().setLanguage(lang);
|
StringTranslate.func_74808_a().func_74810_a(lang);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -84,11 +84,11 @@ public class LanguageRegistry
|
|||||||
{
|
{
|
||||||
String objectName;
|
String objectName;
|
||||||
if (objectToName instanceof Item) {
|
if (objectToName instanceof Item) {
|
||||||
objectName=((Item)objectToName).getItemName();
|
objectName=((Item)objectToName).func_77658_a();
|
||||||
} else if (objectToName instanceof Block) {
|
} else if (objectToName instanceof Block) {
|
||||||
objectName=((Block)objectToName).getBlockName();
|
objectName=((Block)objectToName).func_71917_a();
|
||||||
} else if (objectToName instanceof ItemStack) {
|
} else if (objectToName instanceof ItemStack) {
|
||||||
objectName=((ItemStack)objectToName).getItem().getItemNameIS((ItemStack)objectToName);
|
objectName=((ItemStack)objectToName).func_77973_b().func_77667_c((ItemStack)objectToName);
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException(String.format("Illegal object for naming %s",objectToName));
|
throw new IllegalArgumentException(String.format("Illegal object for naming %s",objectToName));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user