aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/item
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2021-11-28 16:46:38 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2021-11-28 16:46:38 +0000
commitd76fe6c897d28af0f99c0fa04c7de7c654497742 (patch)
treea1dc2c2eba611dc9695176c890a2db7cf969b01d /src/Java/gtPlusPlus/core/item
parenteda554bf83a499efb07b502b7aa3c91db6f380b0 (diff)
downloadGT5-Unofficial-d76fe6c897d28af0f99c0fa04c7de7c654497742.tar.gz
GT5-Unofficial-d76fe6c897d28af0f99c0fa04c7de7c654497742.tar.bz2
GT5-Unofficial-d76fe6c897d28af0f99c0fa04c7de7c654497742.zip
Added NEI handler for LFTR Sparging.
Fixed Material generation for noble gases. Fixed Chemical Formula not being applied to some cells.
Diffstat (limited to 'src/Java/gtPlusPlus/core/item')
-rw-r--r--src/Java/gtPlusPlus/core/item/ModItems.java2
-rw-r--r--src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java15
2 files changed, 15 insertions, 2 deletions
diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java
index 1e0b779bac..e95b646f8e 100644
--- a/src/Java/gtPlusPlus/core/item/ModItems.java
+++ b/src/Java/gtPlusPlus/core/item/ModItems.java
@@ -232,6 +232,7 @@ public final class ModItems {
public static Item dustFertUN32;
public static Fluid fluidFLiBeSalt;
+ public static Fluid fluidFLiBeSaltBurnt;
//Possibly missing base items that GT may be missing.
@@ -715,6 +716,7 @@ public final class ModItems {
dustLi2BeF4 = ItemUtils.generateSpecialUseDusts("Li2BeF4", "Li2BeF4 Fuel Compound", "Li2BeF4", Utils.rgbtoHexValue(255, 255, 255))[0]; //https://en.wikipedia.org/wiki/FLiBe
//fluidFLiBeSalt = ("Li2BeF4", "Li2BeF4", 7430, new short[]{255, 255, 255, 100}, 0);
fluidFLiBeSalt = FluidUtils.addGTFluidNoPrefix("Li2BeF4", "Li2BeF4", new short[]{255, 255, 255, 100}, 0, 743, null, CI.emptyCells(1), 1000, true);
+ fluidFLiBeSaltBurnt = FluidUtils.addGTFluidNoPrefix("Li2BeF2UF4", "Li2BeF2UF4", new short[]{50, 255, 50, 100}, 0, 743, null, CI.emptyCells(1), 1000, true);
//LFTR Control Circuit
itemCircuitLFTR = new CoreItem("itemCircuitLFTR", ""+EnumChatFormatting.GREEN+"Control Circuit", AddToCreativeTab.tabMisc, 1, 0, new String[] {"Keeps Multiblocks Stable"}, EnumRarity.epic, EnumChatFormatting.DARK_GREEN, false, null);
diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java
index 9b732e38e1..1975e7770d 100644
--- a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java
+++ b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java
@@ -46,6 +46,8 @@ 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;
@@ -59,6 +61,7 @@ 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)
@@ -84,8 +87,9 @@ public class BaseItemComponent extends Item{
else {
aFormattedNameForFluids = unlocalName;
}
-
- this.componentMaterial = null;
+ Material aTempMaterial = Material.mMaterialCache.get(localName.toLowerCase());
+ Logger.INFO("Attempted to get "+localName+" cell material from cache. Valid? "+(aTempMaterial != null));
+ this.componentMaterial = aTempMaterial;
this.unlocalName = "itemCell"+aFormattedNameForFluids;
this.materialName = localName;
this.componentType = ComponentTypes.CELL;
@@ -94,6 +98,7 @@ public class BaseItemComponent extends Item{
this.setMaxStackSize(64);
this.componentColour = MathUtils.getRgbAsHex(RGBA);
this.extraData = RGBA;
+
this.setTextureName(CORE.MODID + ":" + "item"+ComponentTypes.CELL.COMPONENT_NAME);
GameRegistry.registerItem(this, aFormattedNameForFluids);
GT_OreDictUnificator.registerOre(ComponentTypes.CELL.getOreDictName()+Utils.sanitizeStringKeepBrackets(localName), ItemUtils.getSimpleStack(this));
@@ -202,6 +207,12 @@ public class BaseItemComponent extends Item{
}
}
}
+ else {
+ String aChemicalFormula = mChemicalFormula.get(materialName.toLowerCase());
+ if (aChemicalFormula != null && aChemicalFormula.length() > 0) {
+ list.add(Utils.sanitizeStringKeepBrackets(aChemicalFormula));
+ }
+ }
//Hidden Tooltip
if (KeyboardUtils.isCtrlKeyDown()) {