Skip to content

Commit

Permalink
Add Cryogenic Air Recipes (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
TechLord22 authored Aug 11, 2021
1 parent d1a5619 commit 9a307e1
Show file tree
Hide file tree
Showing 8 changed files with 125 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

public class UniversalDistillationRecipeBuilder extends RecipeBuilder<UniversalDistillationRecipeBuilder> {

private boolean doDistilleryRecipes = true;

public UniversalDistillationRecipeBuilder() {
}

Expand All @@ -29,6 +31,11 @@ public UniversalDistillationRecipeBuilder copy() {

@Override
public void buildAndRegister() {
if (!this.doDistilleryRecipes) {
super.buildAndRegister();
return;
}

for (int i = 0; i < fluidOutputs.size(); i++) {
IntCircuitRecipeBuilder builder = RecipeMaps.DISTILLERY_RECIPES.recipeBuilder().copy().EUt(Math.max(1, this.EUt / 4)).circuitMeta(i + 1);

Expand Down Expand Up @@ -104,4 +111,10 @@ private boolean isFluidStackDivisibleForDistillery(FluidStack fluidStack, int di
return GTUtility.isFluidStackAmountDivisible(fluidStack, divisor) && fluidStack.amount / divisor >= 25;
}

// todo expose to CT
public UniversalDistillationRecipeBuilder disableDistilleryRecipes() {
this.doDistilleryRecipes = false;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -635,9 +635,12 @@ public static void register() {
public static Material DilutedSulfuricAcid;
public static Material DilutedHydrochloricAcid;
public static Material Flint;
public static Material NobleGases;
public static Material Air;
public static Material LiquidAir;
public static Material NetherAir;
public static Material LiquidNetherAir;
public static Material EnderAir;
public static Material LiquidEnderAir;

/**
* Third Degree Materials
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,25 +373,46 @@ public static void register() {
.toolStats(6, 4, 80)
.build();

//todo this is stupid
NobleGases = new Material.Builder(2050, "noble_gases")
Air = new Material.Builder(2050, "air")
.fluid(Material.FluidType.GAS)
.color(0xA9D0F5)
.components(CarbonDioxide, 25, Helium, 11, Methane, 4, Deuterium, 2, Radon, 1)
.flags(DISABLE_DECOMPOSITION)
.components(Nitrogen, 78, Oxygen, 21, Argon, 9)
.build();

Air = new Material.Builder(2051, "air")
.fluid(Material.FluidType.GAS)
LiquidAir = new Material.Builder(2051, "liquid_air")
.fluid()
.color(0xA9D0F5)
.flags(DISABLE_DECOMPOSITION)
.components(Nitrogen, 40, Oxygen, 11, Argon, 1, NobleGases, 1)
.components(Nitrogen, 143, Oxygen, 45, CarbonDioxide, 10, Helium, 1, Argon, 1, Ice, 1)
.build();

NetherAir = new Material.Builder(2052, "nether_air")
.fluid(Material.FluidType.GAS)
.color(0x4C3434)
.flags(DISABLE_DECOMPOSITION)
.components(CarbonMonoxide, 78, HydrogenSulfide, 21, Neon, 9)
.build();

LiquidAir = new Material.Builder(2052, "liquid_air")
LiquidNetherAir = new Material.Builder(2053, "liquid_nether_air")
.fluid()
.color(0xA9D0F5)
.color(0x4C3434)
.flags(DISABLE_DECOMPOSITION)
.components(CarbonMonoxide, 144, CoalGas, 20, HydrogenSulfide, 15, SulfurDioxide, 15, Helium3, 5, Neon, 1, Ash, 1)
.build();

EnderAir = new Material.Builder(2054, "ender_air")
.fluid(Material.FluidType.GAS)
.color(0x283454)
.flags(DISABLE_DECOMPOSITION)
.components(NitrogenDioxide, 78, Deuterium, 21, Xenon, 9)
.build();

LiquidEnderAir = new Material.Builder(2055, "liquid_ender_air")
.fluid()
.color(0x283454)
.flags(DISABLE_DECOMPOSITION)
.components(Nitrogen, 40, Oxygen, 11, Argon, 1, NobleGases, 1)
.components(NitrogenDioxide, 122, Deuterium, 50, Helium, 15, Tritium, 10, Krypton, 1, Xenon, 1, Radon, 1, EnderPearl, 1)
.build();
}
}
2 changes: 1 addition & 1 deletion src/main/java/gregtech/loaders/recipe/CircuitRecipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private static void waferRecipes() {
BLAST_RECIPES.recipeBuilder().duration(18000).EUt(7680)
.input(block, Silicon, 32)
.input(ingot, Neutronium, 4)
.fluidInputs(Radon.getFluid(8000))
.fluidInputs(Xenon.getFluid(8000))
.output(NEUTRONIUM_BOULE)
.blastFurnaceTemp(6484)
.buildAndRegister();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,17 @@ public static void init() {
VACUUM_RECIPES.recipeBuilder()
.fluidInputs(Air.getFluid(4000))
.fluidOutputs(LiquidAir.getFluid(4000))
.duration(400).EUt(30).buildAndRegister();
.duration(80).EUt(480).buildAndRegister();

VACUUM_RECIPES.recipeBuilder()
.fluidInputs(NetherAir.getFluid(4000))
.fluidOutputs(LiquidNetherAir.getFluid(4000))
.duration(80).EUt(1920).buildAndRegister();

VACUUM_RECIPES.recipeBuilder()
.fluidInputs(EnderAir.getFluid(4000))
.fluidOutputs(LiquidEnderAir.getFluid(4000))
.duration(80).EUt(7680).buildAndRegister();

BLAST_RECIPES.recipeBuilder()
.input(dust, FerriteMixture)
Expand Down Expand Up @@ -82,8 +92,20 @@ public static void init() {

GAS_COLLECTOR_RECIPES.recipeBuilder()
.notConsumable(new IntCircuitIngredient(1))
.fluidOutputs(Air.getFluid(1000))
.fluidOutputs(Air.getFluid(10000))
.dimension(0)
.duration(20).EUt(16).buildAndRegister();
.duration(200).EUt(16).buildAndRegister();

GAS_COLLECTOR_RECIPES.recipeBuilder()
.notConsumable(new IntCircuitIngredient(1))
.fluidOutputs(NetherAir.getFluid(10000))
.dimension(-1)
.duration(200).EUt(64).buildAndRegister();

GAS_COLLECTOR_RECIPES.recipeBuilder()
.notConsumable(new IntCircuitIngredient(1))
.fluidOutputs(EnderAir.getFluid(10000))
.dimension(1)
.duration(200).EUt(256).buildAndRegister();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -404,5 +404,41 @@ public static void init() {
.fluidInputs(OilHeavy.getFluid(100))
.fluidOutputs(Oil.getFluid(100))
.duration(16).EUt(24).buildAndRegister();

DISTILLATION_RECIPES.recipeBuilder()
.fluidInputs(LiquidAir.getFluid(50000))
.fluidOutputs(Nitrogen.getFluid(35750))
.fluidOutputs(Oxygen.getFluid(11250))
.fluidOutputs(CarbonDioxide.getFluid(2500))
.fluidOutputs(Helium.getFluid(250))
.fluidOutputs(Argon.getFluid(250))
.chancedOutput(dust, Ice, 9000, 0)
.disableDistilleryRecipes()
.duration(2000).EUt(480).buildAndRegister();

DISTILLATION_RECIPES.recipeBuilder()
.fluidInputs(LiquidNetherAir.getFluid(100000))
.fluidOutputs(CarbonMonoxide.getFluid(72000))
.fluidOutputs(CoalGas.getFluid(10000))
.fluidOutputs(HydrogenSulfide.getFluid(7500))
.fluidOutputs(SulfurDioxide.getFluid(7500))
.fluidOutputs(Helium3.getFluid(2500))
.fluidOutputs(Neon.getFluid(500))
.chancedOutput(dustSmall, Ash, 9000, 0)
.disableDistilleryRecipes()
.duration(2000).EUt(1920).buildAndRegister();

DISTILLATION_RECIPES.recipeBuilder()
.fluidInputs(LiquidEnderAir.getFluid(200000))
.fluidOutputs(NitrogenDioxide.getFluid(122000))
.fluidOutputs(Deuterium.getFluid(50000))
.fluidOutputs(Helium.getFluid(15000))
.fluidOutputs(Tritium.getFluid(10000))
.fluidOutputs(Krypton.getFluid(1000))
.fluidOutputs(Xenon.getFluid(1000))
.fluidOutputs(Radon.getFluid(1000))
.chancedOutput(dustTiny, EnderPearl, 9000, 0)
.disableDistilleryRecipes()
.duration(2000).EUt(7680).buildAndRegister();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,6 @@ public static void init() {
.fluidOutputs(LPG.getFluid(4000))
.duration(200).EUt(5).buildAndRegister();

CENTRIFUGE_RECIPES.recipeBuilder()
.fluidInputs(LiquidAir.getFluid(53000))
.fluidOutputs(Nitrogen.getFluid(32000))
.fluidOutputs(Nitrogen.getFluid(8000))
.fluidOutputs(Oxygen.getFluid(11000))
.fluidOutputs(Argon.getFluid(1000))
.fluidOutputs(NobleGases.getFluid(1000))
.duration(1484).EUt(5).buildAndRegister();

CENTRIFUGE_RECIPES.recipeBuilder()
.fluidInputs(NobleGases.getFluid(34000))
.fluidOutputs(CarbonDioxide.getFluid(21000))
.fluidOutputs(Helium.getFluid(9000))
.fluidOutputs(Methane.getFluid(3000))
.fluidOutputs(Deuterium.getFluid(1000))
.duration(680).EUt(5).buildAndRegister();

CENTRIFUGE_RECIPES.recipeBuilder()
.fluidInputs(Butane.getFluid(320))
.fluidOutputs(LPG.getFluid(370))
Expand Down Expand Up @@ -297,6 +280,18 @@ public static void init() {
.fluidOutputs(Oxygen.getFluid(1000))
.buildAndRegister();

CENTRIFUGE_RECIPES.recipeBuilder().duration(1600).EUt(30)
.fluidInputs(NetherAir.getFluid(10000))
.fluidOutputs(CarbonMonoxide.getFluid(3900))
.fluidOutputs(SulfurDioxide.getFluid(1000))
.buildAndRegister();

CENTRIFUGE_RECIPES.recipeBuilder().duration(1600).EUt(480)
.fluidInputs(EnderAir.getFluid(10000))
.fluidOutputs(NitrogenDioxide.getFluid(3900))
.fluidOutputs(Deuterium.getFluid(1000))
.buildAndRegister();

// Stone Dust
CENTRIFUGE_RECIPES.recipeBuilder().duration(480).EUt(120)
.input(dust, Stone)
Expand Down
5 changes: 4 additions & 1 deletion src/main/resources/assets/gregtech/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -1243,9 +1243,12 @@ material.tennantite=Tennantite

material.methane=Methane
material.carbon_dioxide=Carbon Dioxide
material.noble_gases=Noble Gases
material.air=Air
material.liquid_air=Liquid Air
material.nether_air=Nether Air
material.liquid_nether_air=Liquid Nether Air
material.ender_air=Ender Air
material.liquid_ender_air=Liquid Ender Air
material.almandine=Almandine
material.andradite=Andradite
material.annealed_copper=Annealed Copper
Expand Down

0 comments on commit 9a307e1

Please sign in to comment.