-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added recipes for methane cracking and removed gtceu recipe * updated changelog * added steam duh
- Loading branch information
Showing
7 changed files
with
142 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/main/java/tkcy/simpleaddon/api/unification/materials/other/MethaneCracking.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package tkcy.simpleaddon.api.unification.materials.other; | ||
|
||
import static gregtech.api.unification.material.Materials.*; | ||
import static gregtech.api.util.GTUtility.gregtechId; | ||
import static tkcy.simpleaddon.api.unification.materials.TKCYSAMaterials.*; | ||
|
||
import gregtech.api.unification.material.Material; | ||
|
||
public class MethaneCracking { | ||
|
||
public static int register(int startId) { | ||
LightlySteamCrackedMethane = new Material.Builder(startId++, gregtechId("lightly_steam_cracked_methane")) | ||
.fluid() | ||
.components(Hydrogen, 3, CarbonMonoxide, 2, DistilledWater, 2) | ||
.colorAverage() | ||
.build(); | ||
|
||
ModeratelySteamCrackedMethane = new Material.Builder(startId++, gregtechId("moderately_steam_cracked_methane")) | ||
.fluid() | ||
.components(Hydrogen, 6, CarbonMonoxide, 1, DistilledWater, 2) | ||
.colorAverage() | ||
.build(); | ||
|
||
SeverelySteamCrackedMethane = new Material.Builder(startId++, gregtechId("severely_steam_cracked_methane")) | ||
.fluid() | ||
.components(Hydrogen, 4, CarbonDioxide, 1, DistilledWater, 4) | ||
.colorAverage() | ||
.build(); | ||
|
||
LightlySteamCrackedMethane.setFormula(""); | ||
ModeratelySteamCrackedMethane.setFormula(""); | ||
SeverelySteamCrackedMethane.setFormula(""); | ||
|
||
return startId; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 89 additions & 0 deletions
89
src/main/java/tkcy/simpleaddon/loaders/recipe/handlers/harderstuff/MethaneCracking.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
package tkcy.simpleaddon.loaders.recipe.handlers.harderstuff; | ||
|
||
import static gregtech.api.GTValues.HV; | ||
import static gregtech.api.GTValues.VA; | ||
import static gregtech.api.recipes.RecipeMaps.CHEMICAL_RECIPES; | ||
import static gregtech.api.recipes.RecipeMaps.DISTILLATION_RECIPES; | ||
import static gregtech.api.unification.material.Materials.*; | ||
import static gregtech.api.unification.material.Materials.Hydrogen; | ||
import static tkcy.simpleaddon.api.unification.materials.TKCYSAMaterials.*; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
import net.minecraft.item.ItemStack; | ||
import net.minecraftforge.fluids.FluidStack; | ||
|
||
import gregtech.api.recipes.Recipe; | ||
import gregtech.api.recipes.RecipeMaps; | ||
import gregtech.api.recipes.ingredients.IntCircuitIngredient; | ||
|
||
public class MethaneCracking { | ||
|
||
public static void init() { | ||
removeGTCEuRecipe(); | ||
addDistillationRecipes(); | ||
addMethaneCrackingRecipes(); | ||
} | ||
|
||
private static void addMethaneCrackingRecipes() { | ||
// 2 CH4 + H2O -> 2 CO + 3 H2 | ||
RecipeMaps.CRACKING_RECIPES.recipeBuilder() | ||
.notConsumable(new IntCircuitIngredient(1)) | ||
.fluidInputs(Methane.getFluid(1000)) | ||
.fluidInputs(Steam.getFluid(1000)) | ||
.fluidOutputs(LightlySteamCrackedMethane.getFluid(1000)) | ||
.duration(120).EUt(120).buildAndRegister(); | ||
|
||
// CH4 + H2O -> CO + 3 H2 | ||
RecipeMaps.CRACKING_RECIPES.recipeBuilder() | ||
.notConsumable(new IntCircuitIngredient(2)) | ||
.fluidInputs(Methane.getFluid(1000)) | ||
.fluidInputs(Steam.getFluid(1000)) | ||
.fluidOutputs(ModeratelySteamCrackedMethane.getFluid(1000)) | ||
.duration(120).EUt(180).buildAndRegister(); | ||
|
||
// CH4 + 2 H2O -> CO2 + 4 H2 | ||
RecipeMaps.CRACKING_RECIPES.recipeBuilder() | ||
.notConsumable(new IntCircuitIngredient(3)) | ||
.fluidInputs(Methane.getFluid(1000)) | ||
.fluidInputs(Steam.getFluid(1000)) | ||
.fluidOutputs(SeverelySteamCrackedMethane.getFluid(1000)) | ||
.duration(120).EUt(240).buildAndRegister(); | ||
} | ||
|
||
private static void addDistillationRecipes() { | ||
DISTILLATION_RECIPES.recipeBuilder() | ||
.fluidInputs(LightlySteamCrackedMethane.getFluid(1000)) | ||
.fluidOutputs(DistilledWater.getFluid(1000)) | ||
.fluidOutputs(CarbonMonoxide.getFluid(1000)) | ||
.fluidOutputs(Hydrogen.getFluid(1500)) | ||
.duration(120).EUt(120).buildAndRegister(); | ||
|
||
DISTILLATION_RECIPES.recipeBuilder() | ||
.fluidInputs(ModeratelySteamCrackedMethane.getFluid(1000)) | ||
.fluidOutputs(DistilledWater.getFluid(2000)) | ||
.fluidOutputs(CarbonMonoxide.getFluid(1000)) | ||
.fluidOutputs(Hydrogen.getFluid(3000)) | ||
.duration(120).EUt(120).buildAndRegister(); | ||
|
||
DISTILLATION_RECIPES.recipeBuilder() | ||
.fluidInputs(SeverelySteamCrackedMethane.getFluid(1000)) | ||
.fluidOutputs(DistilledWater.getFluid(4000)) | ||
.fluidOutputs(CarbonDioxide.getFluid(1000)) | ||
.fluidOutputs(Hydrogen.getFluid(4000)) | ||
.duration(120).EUt(120).buildAndRegister(); | ||
} | ||
|
||
private static void removeGTCEuRecipe() { | ||
List<ItemStack> circuit = Collections.singletonList(IntCircuitIngredient.getIntegratedCircuit(1)); | ||
|
||
List<FluidStack> input = new ArrayList<>(); | ||
input.add(Water.getFluid(2000)); | ||
input.add(Methane.getFluid(1000)); | ||
|
||
Recipe gtceuRecipe = CHEMICAL_RECIPES.findRecipe(VA[HV], circuit, input); | ||
if (gtceuRecipe != null) CHEMICAL_RECIPES.removeRecipe(gtceuRecipe); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters