Skip to content

Commit

Permalink
Titanium Tweaks (GregTechCEu#2366)
Browse files Browse the repository at this point in the history
Co-authored-by: TechLord22 <[email protected]>
  • Loading branch information
serenibyss and TechLord22 authored Jul 26, 2024
1 parent 9f3bb32 commit 20bb302
Show file tree
Hide file tree
Showing 9 changed files with 207 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ public static void register() {
public static Material NaquadriaSulfate;
public static Material Pyrochlore;
public static Material RTMAlloy;
public static Material IlmeniteSlag;

/**
* Organic chemistry
Expand Down Expand Up @@ -682,6 +683,11 @@ public static void register() {
public static Material Lapotron;
public static Material UUMatter;
public static Material PCBCoolant;
public static Material BauxiteSlurry;
public static Material CrackedBauxiteSlurry;
public static Material BauxiteSludge;
public static Material DecalcifiedBauxiteSludge;
public static Material BauxiteSlag;

/**
* Second Degree Compounds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,7 @@ public static void register() {
SodiumBicarbonate = new Material.Builder(366, gregtechId("sodium_bicarbonate"))
.dust(1)
.color(0x565b96).iconSet(ROUGH)
.flags(DISABLE_DECOMPOSITION)
.components(Sodium, 1, Hydrogen, 1, Carbon, 1, Oxygen, 3)
.build();

Expand Down Expand Up @@ -1553,5 +1554,10 @@ public static void register() {
.blastStats(VA[EV], 1400)
.vacuumStats(VA[HV], 250))
.build();

IlmeniteSlag = new Material.Builder(452, gregtechId("ilmenite_slag"))
.dust(1)
.color(0x8B0000).iconSet(SAND)
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,9 @@ public static void register() {
oreProp.setOreByProducts(GarnetYellow, Calcium);

oreProp = Ilmenite.getProperty(PropertyKey.ORE);
oreProp.setOreByProducts(Iron, Rutile);
oreProp.setOreByProducts(Iron, Rutile, Rutile, IlmeniteSlag);
oreProp.setSeparatedInto(Iron);
oreProp.setWashedIn(SodiumPersulfate);

oreProp = Bauxite.getProperty(PropertyKey.ORE);
oreProp.setOreByProducts(Grossular, Rutile, Gallium);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -640,5 +640,22 @@ public static void register() {

PCBCoolant = new Material.Builder(1650, gregtechId("pcb_coolant"))
.fluid().color(0xD5D69C).build();

BauxiteSlurry = new Material.Builder(1651, gregtechId("bauxite_slurry"))
.fluid().color(0x051650).build();

CrackedBauxiteSlurry = new Material.Builder(1652, gregtechId("cracked_bauxite_slurry"))
.liquid(new FluidBuilder().temperature(775)).color(0x052C50).build();

BauxiteSludge = new Material.Builder(1653, gregtechId("bauxite_sludge"))
.fluid().color(0x563D2D).build();

DecalcifiedBauxiteSludge = new Material.Builder(1654, gregtechId("decalcified_bauxite_sludge"))
.fluid().color(0x6F2DA8).build();

BauxiteSlag = new Material.Builder(1655, gregtechId("bauxite_slag"))
.dust(1)
.color(0x0C0550).iconSet(SAND)
.build();
}
}
19 changes: 0 additions & 19 deletions src/main/java/gregtech/loaders/recipe/MachineRecipeLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -1029,25 +1029,6 @@ private static void registerBlastFurnaceRecipes() {
BLAST_RECIPES.recipeBuilder().duration(320).EUt(100).input(gem, Sapphire).output(nugget, Aluminium, 3)
.blastFurnaceTemp(1200).buildAndRegister();

// Titanium tetrachloride
BLAST_RECIPES.recipeBuilder().duration(800).EUt(VA[HV])
.input(dust, Magnesium, 2)
.fluidInputs(TitaniumTetrachloride.getFluid(1000))
.output(ingotHot, Titanium)
.output(dust, MagnesiumChloride, 6)
.blastFurnaceTemp(Titanium.getBlastTemperature() + 200)
.buildAndRegister();

// Rutile from ilmenite
BLAST_RECIPES.recipeBuilder()
.input(dust, Ilmenite, 10)
.input(dust, Carbon, 4)
.output(ingot, WroughtIron, 2)
.output(dust, Rutile, 4)
.fluidOutputs(CarbonDioxide.getFluid(2000))
.blastFurnaceTemp(1700)
.duration(1600).EUt(VA[HV]).buildAndRegister();

// Tempered Glass
BLAST_RECIPES.recipeBuilder()
.input(block, Glass)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public static void init() {
PlatGroupMetalsRecipes.init();
NaquadahRecipes.init();
AcidRecipes.init();
TitaniumRecipes.init();

// A Few Random Recipes
FLUID_HEATER_RECIPES.recipeBuilder()
Expand Down Expand Up @@ -107,23 +108,5 @@ public static void init() {
.fluidOutputs(EnderAir.getFluid(10000))
.dimension(1)
.duration(200).EUt(256).buildAndRegister();

// CaCO3 + 2NaCl -> Na2CO3 + CaCl2
BLAST_RECIPES.recipeBuilder()
.input(dust, Calcite, 5)
.input(dust, Salt, 4)
.output(dust, SodaAsh, 6)
.output(dust, CalciumChloride, 3)
.duration(120).EUt(VA[MV]).blastFurnaceTemp(1500)
.buildAndRegister();

// 2NaOH + CO2 -> Na2CO3 + H20
CHEMICAL_RECIPES.recipeBuilder()
.input(dust, SodiumHydroxide, 6)
.fluidInputs(CarbonDioxide.getFluid(1000))
.output(dust, SodaAsh, 6)
.fluidOutputs(Water.getFluid(1000))
.duration(80).EUt(VA[HV])
.buildAndRegister();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
import net.minecraftforge.oredict.OreDictionary;

import static gregtech.api.GTValues.*;
import static gregtech.api.recipes.RecipeMaps.CHEMICAL_RECIPES;
import static gregtech.api.recipes.RecipeMaps.LARGE_CHEMICAL_RECIPES;
import static gregtech.api.recipes.RecipeMaps.*;
import static gregtech.api.unification.material.Materials.*;
import static gregtech.api.unification.ore.OrePrefix.*;

Expand Down Expand Up @@ -83,14 +82,6 @@ public static void init() {
.fluidOutputs(SiliconeRubber.getFluid(1296))
.duration(600).EUt(VA[LV]).buildAndRegister();

CHEMICAL_RECIPES.recipeBuilder()
.input(dust, Carbon, 2)
.input(dust, Rutile)
.fluidInputs(Chlorine.getFluid(4000))
.fluidOutputs(CarbonMonoxide.getFluid(2000))
.fluidOutputs(TitaniumTetrachloride.getFluid(1000))
.duration(400).EUt(VA[HV]).buildAndRegister();

CHEMICAL_RECIPES.recipeBuilder()
.fluidInputs(Dimethyldichlorosilane.getFluid(1000))
.fluidInputs(Water.getFluid(1000))
Expand Down Expand Up @@ -504,25 +495,12 @@ public static void init() {
.output(dust, Calcite, 5)
.duration(500).EUt(VA[LV]).buildAndRegister();

CHEMICAL_RECIPES.recipeBuilder()
.input(dust, Quicklime, 2)
.fluidInputs(CarbonDioxide.getFluid(1000))
.output(dust, Calcite, 5)
.duration(80).EUt(VA[LV]).buildAndRegister();

CHEMICAL_RECIPES.recipeBuilder()
.input(dust, Magnesia, 2)
.fluidInputs(CarbonDioxide.getFluid(1000))
.output(dust, Magnesite, 5)
.duration(80).EUt(VA[LV]).buildAndRegister();

CHEMICAL_RECIPES.recipeBuilder()
.circuitMeta(1)
.input(dust, Calcite, 5)
.output(dust, Quicklime, 2)
.fluidOutputs(CarbonDioxide.getFluid(1000))
.duration(240).EUt(VA[LV]).buildAndRegister();

CHEMICAL_RECIPES.recipeBuilder()
.input(dust, Magnesite, 5)
.output(dust, Magnesia, 2)
Expand Down
168 changes: 168 additions & 0 deletions src/main/java/gregtech/loaders/recipe/chemistry/TitaniumRecipes.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
package gregtech.loaders.recipe.chemistry;

import static gregtech.api.GTValues.*;
import static gregtech.api.recipes.RecipeMaps.*;
import static gregtech.api.recipes.RecipeMaps.BLAST_RECIPES;
import static gregtech.api.unification.material.Materials.*;
import static gregtech.api.unification.material.Materials.Water;
import static gregtech.api.unification.ore.OrePrefix.*;

public class TitaniumRecipes {

public static void init() {
titaniumProcess();
solvayProcess();
bauxiteProcess();
ilmeniteProcess();
}

// Ilmenite and Rutile Processing
private static void titaniumProcess() {
// Rutile extraction from Ilmenite
// FeTiO3 + C -> Fe + TiO2 + CO
BLAST_RECIPES.recipeBuilder()
.input(dust, Ilmenite, 5)
.input(dust, Carbon)
.output(ingot, WroughtIron)
.output(dust, Rutile, 3)
.fluidOutputs(CarbonMonoxide.getFluid(1000))
.blastFurnaceTemp(1700)
.duration(1600).EUt(VA[HV]).buildAndRegister();

// Chloride Process
// TiO2 + 2C + 4Cl -> TiCl4 + 2CO
CHEMICAL_RECIPES.recipeBuilder()
.input(dust, Carbon, 2)
.input(dust, Rutile)
.fluidInputs(Chlorine.getFluid(4000))
.fluidOutputs(CarbonMonoxide.getFluid(2000))
.fluidOutputs(TitaniumTetrachloride.getFluid(1000))
.duration(400).EUt(VA[HV]).buildAndRegister();

// Kroll Process
// TiCl4 + 2Mg -> Ti + 2MgCl2
BLAST_RECIPES.recipeBuilder().duration(800).EUt(VA[HV])
.input(dust, Magnesium, 2)
.fluidInputs(TitaniumTetrachloride.getFluid(1000))
.output(ingotHot, Titanium)
.output(dust, MagnesiumChloride, 6)
.blastFurnaceTemp(Titanium.getBlastTemperature() + 200)
.buildAndRegister();
}

// The production of Soda Ash and Calcium Chloride from Salt and Calcite
// Used in the Bauxite Process
private static void solvayProcess() {
// CaCO3 -> CaO + CO2
CHEMICAL_RECIPES.recipeBuilder()
.circuitMeta(1)
.input(dust, Calcite, 5)
.output(dust, Quicklime, 2)
.fluidOutputs(CarbonDioxide.getFluid(1000))
.duration(200).EUt(VA[LV]).buildAndRegister();

// NaCl(H2O) + CO2 + NH3 -> NH4Cl + NaHCO3
CHEMICAL_RECIPES.recipeBuilder()
.input(dust, Salt, 4)
.fluidInputs(CarbonDioxide.getFluid(1000))
.fluidInputs(Ammonia.getFluid(1000))
.fluidInputs(Water.getFluid(1000))
.output(dust, AmmoniumChloride, 2)
.output(dust, SodiumBicarbonate, 6)
.duration(400).EUt(VA[MV]).buildAndRegister();

// 2NaHCO3 -> Na2CO3 + CO2 + H2O
ELECTROLYZER_RECIPES.recipeBuilder()
.input(dust, SodiumBicarbonate, 12)
.output(dust, SodaAsh, 6)
.fluidOutputs(CarbonDioxide.getFluid(1000))
.fluidOutputs(Water.getFluid(1000))
.duration(200).EUt(VA[MV]).buildAndRegister();

// 2NH4Cl + CaO -> CaCl2 + 2NH3 + H2O
CHEMICAL_RECIPES.recipeBuilder()
.input(dust, AmmoniumChloride, 4)
.input(dust, Quicklime, 2)
.output(dust, CalciumChloride, 3)
.fluidOutputs(Ammonia.getFluid(2000))
.fluidOutputs(Water.getFluid(1000))
.duration(200).EUt(VA[MV]).buildAndRegister();
}

// Advanced separation process for Bauxite
private static void bauxiteProcess() {
// Bauxite (crushed) + Soda Ash + Calcium Chloride -> Bauxite Slurry
MIXER_RECIPES.recipeBuilder()
.input(crushed, Bauxite, 32)
.input(dust, SodaAsh, 12)
.input(dust, CalciumChloride, 6)
.fluidInputs(Water.getFluid(4000))
.fluidOutputs(BauxiteSlurry.getFluid(4000))
.duration(500).EUt(VA[HV]).buildAndRegister();

// Bauxite (washed) + Soda Ash + Calcium Chloride -> Bauxite Slurry
MIXER_RECIPES.recipeBuilder()
.input(crushedPurified, Bauxite, 32)
.input(dust, SodaAsh, 12)
.input(dust, CalciumChloride, 6)
.fluidInputs(Water.getFluid(4000))
.fluidOutputs(BauxiteSlurry.getFluid(4000))
.duration(500).EUt(VA[HV]).buildAndRegister();

// Bauxite Slurry -> Cracked Bauxite Slurry
CRACKING_RECIPES.recipeBuilder()
.circuitMeta(1)
.fluidInputs(BauxiteSlurry.getFluid(16000))
.fluidInputs(Steam.getFluid(1000))
.fluidOutputs(CrackedBauxiteSlurry.getFluid(16000))
.duration(500).EUt(VA[HV]).buildAndRegister();

// Bauxite Slurry + Sulfuric -> Aluminium, Slag, Sludge, and SO3 (for looping back to Sulfuric Acid)
LARGE_CHEMICAL_RECIPES.recipeBuilder()
.fluidInputs(CrackedBauxiteSlurry.getFluid(4000))
.fluidInputs(SulfuricAcid.getFluid(1000))
.output(dust, Aluminium, 24)
.output(dust, BauxiteSlag, 8)
.fluidOutputs(BauxiteSludge.getFluid(2500))
.fluidOutputs(SulfurTrioxide.getFluid(1000))
.duration(500).EUt(VA[HV]).buildAndRegister();

// Bauxite Slag -> Salt (looped) + Nd + Cr (byproducts)
ELECTROMAGNETIC_SEPARATOR_RECIPES.recipeBuilder()
.input(dust, BauxiteSlag)
.output(dust, Salt)
.chancedOutput(dust, Neodymium, 2000, 250)
.chancedOutput(dust, Chrome, 1000, 250)
.duration(50).EUt(VA[MV]).buildAndRegister();

// Bauxite Sludge -> Calcite (looped) + Decalcified Bauxite Sludge
DISTILLERY_RECIPES.recipeBuilder()
.circuitMeta(1)
.fluidInputs(BauxiteSludge.getFluid(500))
.output(dust, Calcite, 2)
.fluidOutputs(DecalcifiedBauxiteSludge.getFluid(500))
.duration(100).EUt(VA[MV]).buildAndRegister();

// Decalcified Bauxite Sludge -> Rutile, Gallium, SiO2, Iron, Water
CENTRIFUGE_RECIPES.recipeBuilder()
.fluidInputs(DecalcifiedBauxiteSludge.getFluid(250))
.output(dust, Rutile, 2)
.chancedOutput(dust, Gallium, 5000, 550)
.chancedOutput(dust, Gallium, 3000, 800)
.chancedOutput(dust, Gallium, 1000, 1000)
.chancedOutput(dust, SiliconDioxide, 9000, 250)
.chancedOutput(dust, Iron, 8000, 250)
.fluidOutputs(Water.getFluid(250))
.duration(100).EUt(VA[MV]).buildAndRegister();
}

// Byproduct separation for Ilmenite
private static void ilmeniteProcess() {
ELECTROMAGNETIC_SEPARATOR_RECIPES.recipeBuilder()
.input(dust, IlmeniteSlag)
.chancedOutput(dust, Iron, 8000, 0)
.chancedOutput(dust, Tantalum, 2000, 0)
.chancedOutput(dust, Niobium, 500, 0)
.duration(50).EUt(VA[MV]).buildAndRegister();
}
}
6 changes: 6 additions & 0 deletions src/main/resources/assets/gregtech/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -1828,6 +1828,7 @@ gregtech.material.enriched_naquadah_sulfate=Enriched Naquadah Sulfate
gregtech.material.naquadria_sulfate=Naquadria Sulfate
gregtech.material.pyrochlore=Pyrochlore
gregtech.material.rtm_alloy=RTM Alloy
gregtech.material.ilmenite_slag=Ilmenite Slag


# Organic Chemistry Materials
Expand Down Expand Up @@ -2041,6 +2042,11 @@ gregtech.material.acidic_naquadria_solution=Acidic Naquadria Solution
gregtech.material.naquadria_waste=Naquadria Waste
gregtech.material.lapotron=Lapotron
gregtech.material.uu_matter=UU-Matter
gregtech.material.bauxite_slurry=Bauxite Slurry
gregtech.material.cracked_bauxite_slurry=Cracked Bauxite Slurry
gregtech.material.bauxite_sludge=Bauxite Sludge
gregtech.material.decalcified_bauxite_sludge=Decalcified Bauxite Sludge
gregtech.material.bauxite_slag=Bauxite Slag


# Second Degree Materials
Expand Down

0 comments on commit 20bb302

Please sign in to comment.