aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/core/item
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gtPlusPlus/core/item')
-rw-r--r--src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java
index 36f53640aa..361d1bb066 100644
--- a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java
+++ b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java
@@ -108,7 +108,7 @@ public class BaseItemComponent extends Item {
this.unlocalName = "itemCell" + aFormattedNameForFluids;
this.materialName = localName;
this.translatedMaterialName =
- GT_LanguageManager.addStringLocalization("gtplusplus.fluid." + this.unlocalName, this.materialName);
+ getFluidName("fluid." + this.materialName.toLowerCase().replace(" ", ""));
this.componentType = ComponentTypes.CELL;
this.setCreativeTab(AddToCreativeTab.tabMisc);
this.setUnlocalizedName(aFormattedNameForFluids);
@@ -207,6 +207,17 @@ public class BaseItemComponent extends Item {
return this.materialName;
}
+ public String getFluidName(String aKey) {
+ String trans;
+ trans = GT_LanguageManager.getTranslation(aKey);
+ if (!trans.equals(aKey)) return trans;
+ aKey = "fluid." + aKey;
+ trans = GT_LanguageManager.getTranslation(aKey);
+ if (!trans.equals(aKey)) return trans;
+ return GT_LanguageManager.addStringLocalization(
+ "gtplusplus.fluid." + this.materialName.toLowerCase().replace(" ", ""), this.materialName);
+ }
+
@Override
public String getItemStackDisplayName(ItemStack stack) {
return GT_LanguageManager.getTranslation("gtplusplus.item." + unlocalName + ".name")