Finally fixed all the localization

This commit is contained in:
Vexatos committed 2014-08-18 18:44:46 +02:00
1 parent f331cd28cc
commit b246cf8538
4 files changed
+4 -4

No files matched your search

@@ -64,7 +64,7 @@ public class ItemStairs extends ItemForestryBlock {
@Override
public String getUnlocalizedName(ItemStack stack) {
WoodType type = WoodType.getFromCompound(stack.getTagCompound());
return super.getUnlocalizedName(stack) + "." + type.ordinal(); //To change body of generated methods, choose Tools | Templates.
return getBlock().getUnlocalizedName() + "." + type.ordinal(); //To change body of generated methods, choose Tools | Templates.
}
}
@@ -62,7 +62,7 @@ public class ItemCircuitBoard extends ItemForestryMultiPass {
@Override
public String getUnlocalizedName(ItemStack stack) {
EnumCircuitBoardType type = EnumCircuitBoardType.values()[stack.getItemDamage()];
return "item.circuitboard." + type.toString().toLowerCase(Locale.ENGLISH);
return "item.for.circuitboard." + type.toString().toLowerCase(Locale.ENGLISH);
}
@SuppressWarnings({"unchecked", "rawtypes"})
@@ -19,7 +19,7 @@ import net.minecraft.util.StatCollector;
public class StringUtil {
public static String localize(String key) {
return StatCollector.translateToLocal(key).replace("\\n", "\n").replace("@", "%").replace("\\%", "@");
return StatCollector.translateToLocal("for." + key).replace("\\n", "\n").replace("@", "%").replace("\\%", "@");
}
public static String localizeAndFormat(String key, Object... args) {
@@ -64,7 +64,7 @@ public class ItemStamps extends ItemOverlay implements IStamps {
if (itemstack.getItemDamage() < 0 || itemstack.getItemDamage() >= stampInfo.length)
return null;
return super.getUnlocalizedName(itemstack) + "." + stampInfo[itemstack.getItemDamage()].name;
return super.getUnlocalizedName(itemstack);
}