aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Java/gtPlusPlus/core/item/ModItems.java60
-rw-r--r--src/Java/gtPlusPlus/core/material/ALLOY.java73
-rw-r--r--src/Java/gtPlusPlus/core/material/Material.java38
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java43
4 files changed, 150 insertions, 64 deletions
diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java
index 05e5661c69..525b91cf85 100644
--- a/src/Java/gtPlusPlus/core/item/ModItems.java
+++ b/src/Java/gtPlusPlus/core/item/ModItems.java
@@ -164,6 +164,16 @@ public final class ModItems {
if (CORE.DEBUG){
DEBUG_INIT.registerItems();
}
+
+
+ //Some Simple forms of materials
+ itemStickyRubber = new Item().setUnlocalizedName("itemStickyRubber").setCreativeTab(tabMachines).setTextureName(CORE.MODID + ":itemStickyRubber");
+ GameRegistry.registerItem(itemStickyRubber, "itemStickyRubber");
+ GT_OreDictUnificator.registerOre("ingotRubber", ItemUtils.getItemStack(CORE.MODID+":itemStickyRubber", 1));
+
+ itemHeliumBlob = new CoreItem("itemHeliumBlob", tabMisc).setTextureName(CORE.MODID + ":itemHeliumBlob");
+ GT_OreDictUnificator.registerOre("dustHydrogen", new ItemStack(ModItems.itemHeliumBlob));
+ //GameRegistry.registerItem(itemHeliumBlob, "itemHeliumBlob");
//Make some backpacks
//Primary colours
@@ -193,27 +203,40 @@ public final class ModItems {
ItemsFoods.load();
try{
+ //Elements generate first so they can be used in compounds.
+
+ //Uranium-233 is a fissile isotope of uranium that is bred from thorium-232 as part of the thorium fuel cycle.
+ generateItemsFromMaterial(ELEMENT.URANIUM233);
+ generateItemsFromMaterial(ELEMENT.ZIRCONIUM);
+
+ //Carbides - Tungsten Carbide exists in .09 so don't generate it. - Should still come before alloys though
+ if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
+ generateItemsFromMaterial(ALLOY.TUNGSTEN_CARBIDE);
+ }
+ generateItemsFromMaterial(ALLOY.SILICON_CARBIDE);
+ generateItemsFromMaterial(ALLOY.ZIRCONIUM_CARBIDE);
+ generateItemsFromMaterial(ALLOY.TANTALUM_CARBIDE);
+ generateItemsFromMaterial(ALLOY.NIOBIUM_CARBIDE);
+
+ //Generate some Alloys
generateItemsFromMaterial(ALLOY.ENERGYCRYSTAL);
generateItemsFromMaterial(ALLOY.BLOODSTEEL);
+ generateItemsFromMaterial(ALLOY.BEDROCKIUM);
+
generateItemsFromMaterial(ALLOY.STABALLOY);
generateItemsFromMaterial(ALLOY.TANTALLOY_60);
generateItemsFromMaterial(ALLOY.TANTALLOY_61);
- generateItemsFromMaterial(ALLOY.BEDROCKIUM);
- generateItemsFromMaterial(ALLOY.QUANTUM);
-
generateItemsFromMaterial(ALLOY.INCONEL_625);
generateItemsFromMaterial(ALLOY.INCONEL_690);
generateItemsFromMaterial(ALLOY.INCONEL_792);
- if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
- generateItemsFromMaterial(ALLOY.TUNGSTEN_CARBIDE);
- }
- generateItemsFromMaterial(ALLOY.SILICON_CARBIDE);
generateItemsFromMaterial(ALLOY.ZERON_100);
+
generateItemsFromMaterial(ALLOY.MARAGING250);
generateItemsFromMaterial(ALLOY.MARAGING300);
generateItemsFromMaterial(ALLOY.MARAGING350);
+
generateItemsFromMaterial(ALLOY.STELLITE);
generateItemsFromMaterial(ALLOY.TALONITE);
@@ -222,7 +245,6 @@ public final class ModItems {
//Potin is traditionally an alloy of bronze, tin and lead, with varying quantities of each possible
generateItemsFromMaterial(ALLOY.POTIN);
-
generateItemsFromMaterial(ALLOY.HASTELLOY_W);
generateItemsFromMaterial(ALLOY.HASTELLOY_X);
generateItemsFromMaterial(ALLOY.HASTELLOY_C276);
@@ -231,18 +253,12 @@ public final class ModItems {
generateItemsFromMaterial(ALLOY.INCOLOY_020);
generateItemsFromMaterial(ALLOY.INCOLOY_DS);
generateItemsFromMaterial(ALLOY.INCOLOY_MA956);
-
-
- generateItemsFromMaterial(ELEMENT.ZIRCONIUM);
- generateItemsFromMaterial(ALLOY.ZIRCONIUM_CARBIDE);
- generateItemsFromMaterial(ALLOY.TANTALUM_CARBIDE);
- generateItemsFromMaterial(ALLOY.NIOBIUM_CARBIDE);
//Leagrisium
- generateItemsFromMaterial(ALLOY.LEAGRISIUM);
-
- //Uranium-233 is a fissile isotope of uranium that is bred from thorium-232 as part of the thorium fuel cycle.
- generateItemsFromMaterial(ELEMENT.URANIUM233);
+ generateItemsFromMaterial(ALLOY.LEAGRISIUM);
+
+ //Must be the final Alloy to Generate
+ generateItemsFromMaterial(ALLOY.QUANTUM);
} catch (Throwable r){
Utils.LOG_INFO("Failed to Generated a Material. "+r.getMessage());
@@ -444,14 +460,6 @@ public final class ModItems {
//System.out.println("Buffer Core registration count is: "+i);
}
- itemStickyRubber = new Item().setUnlocalizedName("itemStickyRubber").setCreativeTab(tabMachines).setTextureName(CORE.MODID + ":itemStickyRubber");
- GameRegistry.registerItem(itemStickyRubber, "itemStickyRubber");
- GT_OreDictUnificator.registerOre("ingotRubber", ItemUtils.getItemStack(CORE.MODID+":itemStickyRubber", 1));
-
- itemHeliumBlob = new CoreItem("itemHeliumBlob", tabMisc).setTextureName(CORE.MODID + ":itemHeliumBlob");
- GT_OreDictUnificator.registerOre("dustHydrogen", new ItemStack(ModItems.itemHeliumBlob));
- //GameRegistry.registerItem(itemHeliumBlob, "itemHeliumBlob");
-
itemPLACEHOLDER_Circuit = new Item().setUnlocalizedName("itemPLACEHOLDER_Circuit").setTextureName(CORE.MODID + ":itemPLACEHOLDER_Circuit");
GameRegistry.registerItem(itemPLACEHOLDER_Circuit, "itemPLACEHOLDER_Circuit");
diff --git a/src/Java/gtPlusPlus/core/material/ALLOY.java b/src/Java/gtPlusPlus/core/material/ALLOY.java
index 642e402917..975a035628 100644
--- a/src/Java/gtPlusPlus/core/material/ALLOY.java
+++ b/src/Java/gtPlusPlus/core/material/ALLOY.java
@@ -35,9 +35,8 @@ public final class ALLOY {
true, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
- new MaterialStack(ELEMENT.URANIUM, 45),
- new MaterialStack(ELEMENT.URANIUM, 45),
- new MaterialStack(ELEMENT.TITANIUM, 10)
+ new MaterialStack(ELEMENT.URANIUM, 9),
+ new MaterialStack(ELEMENT.TITANIUM, 1)
});
public static final Material TANTALLOY_60 = new Material(
@@ -50,8 +49,7 @@ public final class ALLOY {
true, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
- new MaterialStack(ELEMENT.TUNGSTEN, 8),
- new MaterialStack(ELEMENT.TANTALUM, 46),
+ new MaterialStack(ELEMENT.TUNGSTEN, 4),
new MaterialStack(ELEMENT.TANTALUM, 46)
});
@@ -70,17 +68,6 @@ public final class ALLOY {
new MaterialStack(ELEMENT.YTTRIUM, 8)
});
- public static final Material QUANTUM = new Material(
- "Quantum", //Material Name
- new short[]{128, 128, 128, 0}, //Material Colour
- 9999, //Melting Point in C
- 0, //Boiling Point in C
- 100, //Protons
- 100, //Neutrons
- true, //Uses Blast furnace?
- //Material Stacks with Percentage of required elements.
- null);
-
public static final Material BRONZE = new Material(
"Bronze", //Material Name
new short[]{128, 128, 128, 0}, //Material Colour
@@ -522,5 +509,59 @@ public final class ALLOY {
new MaterialStack(ELEMENT.HYDROGEN, 10)
}); //Material Stacks with Percentage of required elements.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ //Quantum
+ public static final Material QUANTUM = new Material(
+ "Quantum", //Material Name
+ new short[]{128, 128, 255, 50}, //Material Colour
+ 9999, //Melting Point in C
+ 25000, //Boiling Point in C
+ 150, //Protons
+ 200, //Neutrons
+ true, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ALLOY.LEAGRISIUM, 25),
+ new MaterialStack(ALLOY.ENERGYCRYSTAL, 25),
+ new MaterialStack(ALLOY.ZIRCONIUM_CARBIDE, 25),
+ new MaterialStack(ELEMENT.MANGANESE, 5),
+ new MaterialStack(ELEMENT.MOLYBDENUM, 5),
+ new MaterialStack(ELEMENT.TUNGSTEN, 5),
+ new MaterialStack(ELEMENT.BERYLLIUM, 5),
+ new MaterialStack(ELEMENT.BISMUTH, 5)
+ });
+
+
}
diff --git a/src/Java/gtPlusPlus/core/material/Material.java b/src/Java/gtPlusPlus/core/material/Material.java
index 104414ee4c..e8de7166c2 100644
--- a/src/Java/gtPlusPlus/core/material/Material.java
+++ b/src/Java/gtPlusPlus/core/material/Material.java
@@ -168,22 +168,40 @@ public class Material {
this.vChemicalFormula = "??";
}
- this.vMoltenFluid = generateFluid();
+ Materials isValid = Materials.get(getLocalizedName());
+ if (isValid == Materials._NULL){
+ this.vMoltenFluid = generateFluid();
+ }
+ else {
+ if (isValid.mFluid != null){
+ this.vMoltenFluid = isValid.mFluid;
+ }
+ else if (isValid.mGas != null){
+ this.vMoltenFluid = isValid.mGas;
+ }
+ else if (isValid.mPlasma != null){
+ this.vMoltenFluid = isValid.mPlasma;
+ }
+ else {
+ this.vMoltenFluid = generateFluid();
+ }
+ }
+
- dataVar = MathUtils.generateSingularRandomHexValue();
+ //dataVar = MathUtils.generateSingularRandomHexValue();
String ratio = "";
if (vSmallestRatio != null)
- for (int hu=0;hu<vSmallestRatio.length;hu++){
- if (ratio.equals("")){
- ratio = String.valueOf(vSmallestRatio[hu]);
+ for (int hu=0;hu<vSmallestRatio.length;hu++){
+ if (ratio.equals("")){
+ ratio = String.valueOf(vSmallestRatio[hu]);
+ }
+ else {
+ ratio = ratio + ":" +vSmallestRatio[hu];
+ }
}
- else {
- ratio = ratio + ":" +vSmallestRatio[hu];
- }
- }
-
+
Utils.LOG_INFO("Creating a Material instance for "+materialName);
Utils.LOG_INFO("Formula: "+vChemicalFormula + " Smallest Stack: "+smallestStackSizeWhenProcessing+" Smallest Ratio:"+ratio);
Utils.LOG_INFO("Protons: "+vProtons);
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java
index fec8abce49..7c986ad9bb 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java
@@ -1,6 +1,10 @@
package gtPlusPlus.xmod.gregtech.loaders;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.SubTag;
import gregtech.api.objects.MaterialStack;
+import gregtech.api.util.GT_OreDictUnificator;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.util.Utils;
@@ -10,7 +14,7 @@ import net.minecraft.item.ItemStack;
public class RecipeGen_BlastSmelter {
public static void generateRecipes(){
-/*
+
Materials[] GregMaterials = Materials.values();
for (Materials M : GregMaterials){
@@ -64,10 +68,10 @@ public class RecipeGen_BlastSmelter {
//Generate Recipes for all singular materials that can be made molten.
if (M.mBlastFurnaceRequired) {
- //doTest = CORE.RA.addBlastSmelterRecipe(tItemStackTest, M.getMolten(fluidAmount), 100, duration, 240);
+ doTest = CORE.RA.addBlastSmelterRecipe(tItemStackTest, M.getMolten(fluidAmount), 100, duration, 240);
}
else {
- //doTest = CORE.RA.addBlastSmelterRecipe(tItemStackTest, M.getMolten(fluidAmount), 100, duration/2, 120);
+ doTest = CORE.RA.addBlastSmelterRecipe(tItemStackTest, M.getMolten(fluidAmount), 100, duration/2, 120);
}
if (doTest){
@@ -127,10 +131,10 @@ public class RecipeGen_BlastSmelter {
}
}
- //Add a shapeless recipe for each dust this way - Compat mode.
+ /*//Add a shapeless recipe for each dust this way - Compat mode.
ItemStack outputStack = tStack;
outputStack.stackSize = mMaterialListSize;
- RecipeUtils.buildShapelessRecipe(outputStack, components);
+ RecipeUtils.buildShapelessRecipe(outputStack, components);*/
@@ -145,17 +149,17 @@ public class RecipeGen_BlastSmelter {
Utils.LOG_WARNING("tMaterial["+das+"]: "+components[das].getDisplayName()+" Meta: "+components[das].getItemDamage()+", Amount: "+components[das].stackSize);
}
if (M.mBlastFurnaceRequired) {
- //CORE.RA.addBlastSmelterRecipe(components, M.getMolten(fluidAmount), 100, duration, 500);
+ CORE.RA.addBlastSmelterRecipe(components, M.getMolten(fluidAmount), 100, duration, 500);
}
else {
- //CORE.RA.addBlastSmelterRecipe(components, M.getMolten(fluidAmount), 100, duration, 240);
+ CORE.RA.addBlastSmelterRecipe(components, M.getMolten(fluidAmount), 100, duration, 240);
}
}
}
}
}
}
- }*/
+ }
}
@@ -190,7 +194,7 @@ public class RecipeGen_BlastSmelter {
//Make a simple one Material Materialstack[] and log it for validity.
circuitGT = ItemUtils.getGregtechCircuit(1);
- ItemStack[] tItemStackTest = new ItemStack[]{/*circuitGT,*/ tStack};
+ ItemStack[] tItemStackTest = new ItemStack[]{circuitGT, tStack};
inputStackCount = 1;
fluidAmount = 144*inputStackCount;
Utils.LOG_WARNING("Adding an Alloy Blast Smelter Recipe for "+M.getLocalizedName()+". Gives "+fluidAmount+"L of molten metal.");
@@ -270,16 +274,31 @@ public class RecipeGen_BlastSmelter {
components[irc] = M.getComposites()[irc].getDustStack(r);
}
}
+
+ //Adds a circuit
+ if (mMaterialListSize > 0 && mMaterialListSize < 9){
+ ItemStack[] components_NoCircuit = components;
+ //Builds me an ItemStack[] of the materials. - With a circuit
+ components = new ItemStack[components_NoCircuit.length+1];
+ for (int fr=0;fr<components.length;fr++){
+ if (fr==0){
+ components[0] = circuitGT;
+ }
+ else {
+ components[fr] = components_NoCircuit[fr-1];
+ }
+ }
+ }
//Set Fluid output
fluidAmount = 144*inputStackCount;
- Utils.LOG_WARNING("Adding an Alloy Blast Smelter Recipe for "+M.getLocalizedName()+" using it's compound dusts. This material has "+ inputStackCount+" parts. Gives "+fluidAmount+"L of molten metal.");
- Utils.LOG_WARNING("tMaterial.length: "+components.length+".");
+ Utils.LOG_INFO("Adding an Alloy Blast Smelter Recipe for "+M.getLocalizedName()+" using it's compound dusts. This material has "+ inputStackCount+" parts. Gives "+fluidAmount+"L of molten metal.");
+ Utils.LOG_INFO("tMaterial.length: "+components.length+".");
for (int das=0;das<components.length;das++){
if (components[das] != null)
- Utils.LOG_WARNING("tMaterial["+das+"]: "+components[das].getDisplayName()+" Meta: "+components[das].getItemDamage()+", Amount: "+components[das].stackSize);
+ Utils.LOG_INFO("tMaterial["+das+"]: "+components[das].getDisplayName()+" Meta: "+components[das].getItemDamage()+", Amount: "+components[das].stackSize);
}
if (M.requiresBlastFurnace()) {
if (CORE.RA.addBlastSmelterRecipe(components, M.getFluid(fluidAmount), 100, duration, 500)){