aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/item/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/core/item/base')
-rw-r--r--src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java9
-rw-r--r--src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java11
2 files changed, 11 insertions, 9 deletions
diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java
index 1975e7770d..9ad8ea3feb 100644
--- a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java
+++ b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java
@@ -46,8 +46,6 @@ public class BaseItemComponent extends Item{
public final int componentColour;
public Object extraData;
- private static HashMap<String, String> mChemicalFormula = new HashMap<String, String>();
-
protected IIcon base;
protected IIcon overlay;
@@ -61,7 +59,6 @@ public class BaseItemComponent extends Item{
this.setMaxStackSize(64);
//this.setTextureName(this.getCorrectTextures());
this.componentColour = material.getRgbAsHex();
- mChemicalFormula.put(materialName.toLowerCase(), material.vChemicalFormula);
GameRegistry.registerItem(this, this.unlocalName);
//if (componentType != ComponentTypes.DUST)
@@ -182,10 +179,10 @@ public class BaseItemComponent extends Item{
if (this.componentMaterial != null){
- if (!this.componentMaterial.vChemicalFormula.contains("?") && this.componentMaterial.getState() != MaterialState.PURE_LIQUID) {
+ if (!this.componentMaterial.vChemicalFormula.contains("?")) {
list.add(Utils.sanitizeStringKeepBrackets(this.componentMaterial.vChemicalFormula));
}
- else if (this.componentMaterial.vChemicalFormula.contains("?") && this.componentMaterial.getState() != MaterialState.PURE_LIQUID) {
+ else if (this.componentMaterial.vChemicalFormula.contains("?")) {
String temp = componentMaterial.vChemicalFormula;
temp = temp.replace(" ", "");
temp = temp.replace("-", "");
@@ -208,7 +205,7 @@ public class BaseItemComponent extends Item{
}
}
else {
- String aChemicalFormula = mChemicalFormula.get(materialName.toLowerCase());
+ String aChemicalFormula = Material.sChemicalFormula.get(materialName.toLowerCase());
if (aChemicalFormula != null && aChemicalFormula.length() > 0) {
list.add(Utils.sanitizeStringKeepBrackets(aChemicalFormula));
}
diff --git a/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java b/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java
index 883eb241da..2cb23b3f97 100644
--- a/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java
+++ b/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java
@@ -14,7 +14,6 @@ import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.material.Material;
-import gtPlusPlus.core.material.state.MaterialState;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.EntityUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
@@ -124,10 +123,10 @@ public class BaseOreComponent extends Item{
public final void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
if (this.materialName != null && !this.materialName.equals("")){
if (this.componentMaterial != null){
- if (!this.componentMaterial.vChemicalFormula.contains("?") && this.componentMaterial.getState() != MaterialState.PURE_LIQUID) {
+ if (!this.componentMaterial.vChemicalFormula.contains("?")) {
list.add(Utils.sanitizeStringKeepBrackets(this.componentMaterial.vChemicalFormula));
}
- else if (this.componentMaterial.vChemicalFormula.contains("?") && this.componentMaterial.getState() != MaterialState.PURE_LIQUID) {
+ else if (this.componentMaterial.vChemicalFormula.contains("?")) {
String temp = componentMaterial.vChemicalFormula;
temp = temp.replace(" ", "");
temp = temp.replace("-", "");
@@ -142,6 +141,12 @@ public class BaseOreComponent extends Item{
list.add(CORE.GT_Tooltip_Radioactive+" | Level: "+this.componentMaterial.vRadiationLevel);
}
}
+ else {
+ String aChemicalFormula = Material.sChemicalFormula.get(materialName.toLowerCase());
+ if (aChemicalFormula != null && aChemicalFormula.length() > 0) {
+ list.add(Utils.sanitizeStringKeepBrackets(aChemicalFormula));
+ }
+ }
}
super.addInformation(stack, aPlayer, list, bool);
}