Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
made harder aluminium processing mostly configurable
Browse files Browse the repository at this point in the history
you still have to process bauxite, and electrolyzing other stuff gives alumina now
  • Loading branch information
Trinsdar committed Sep 23, 2023
1 parent fd66bc9 commit 5053ad1
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 36 deletions.
6 changes: 5 additions & 1 deletion common/src/main/java/muramasa/gregtech/GregTechConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static class Gameplay {

public static class CommonConfig {

public ForgeConfigSpec.BooleanValue HARDER_WOOD, MORE_COMPLICATED_CHEMICAL_RECIPES, HARDER_CIRCUITS;
public ForgeConfigSpec.BooleanValue HARDER_WOOD, MORE_COMPLICATED_CHEMICAL_RECIPES, HARDER_CIRCUITS, HARDER_ALUMINIUM_PROCESSING;

public ForgeConfigSpec.BooleanValue REPLACEMENT_VANILLA_ORE_GEN;

Expand All @@ -54,6 +54,9 @@ public CommonConfig(ForgeConfigSpec.Builder builder) {
HARDER_CIRCUITS = builder.comment("Enables more complicated circuit recipes added in versions of gt5u after 509.25 - Default: false")
.translation(GTIRef.ID + ".config.harder_circuits")
.define("HARDER_CIRCUITS", false);
HARDER_ALUMINIUM_PROCESSING = builder.comment("Enables gt6's alumina processing, if disabled alumina reverts back to just being in the blast furnace - Default: true")
.translation(GTIRef.ID + ".config.harder_aluminium_processing")
.define("HARDER_ALUMINIUM_PROCESSING", true);
builder.pop();

}
Expand All @@ -64,6 +67,7 @@ private static void bakeCommonConfig() {
GAMEPLAY.HARDER_WOOD = COMMON_CONFIG.HARDER_WOOD.get();
GAMEPLAY.MORE_COMPLICATED_CHEMICAL_RECIPES = COMMON_CONFIG.MORE_COMPLICATED_CHEMICAL_RECIPES.get();
GAMEPLAY.HARDER_CIRCUITS = COMMON_CONFIG.HARDER_CIRCUITS.get();
GAMEPLAY.HARDER_ALUMINIUM_PROCESSING = COMMON_CONFIG.HARDER_ALUMINIUM_PROCESSING.get();

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static void onMaterialEvent(GregTechMaterialEvent event){
event.setMaterial(Neon).asPlasma();
event.setMaterial(Sodium).asDust(370);
event.setMaterial(Magnesium).asMetal(1383, 0/*1383*/);
event.setMaterial(Aluminium).asMetal(933, 0, PLATE, ROD_LONG, SCREW, BOLT, RING, GEAR, FRAME, GEAR_SMALL, FOIL);
event.setMaterial(Aluminium).asMetal(933, 0, PLATE, ROD_LONG, SCREW, BOLT, RING, GEAR, FRAME, GEAR_SMALL, FOIL, HAS_CUSTOM_SMELTING);
event.setMaterial(Silicon).asMetal(1683, 1683, PLATE, FOIL);
event.setMaterial(Phosphor).asDust(933);
event.setMaterial(Sulfur).asDust(388).asOre().harvestLevel(2).asPlasma();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import muramasa.antimatter.recipe.ingredient.RecipeIngredient;
import muramasa.antimatter.util.TagUtils;
import muramasa.gregtech.GTIRef;
import muramasa.gregtech.GregTechConfig;
import muramasa.gregtech.data.GregTechData;
import muramasa.gregtech.data.Materials;
import net.minecraft.data.recipes.SimpleCookingRecipeBuilder;
Expand All @@ -25,6 +26,9 @@ public static void loadRecipes(Consumer<FinishedRecipe> output, AntimatterRecipe
SimpleCookingRecipeBuilder.smelting(RecipeIngredient.of(GregTechData.CompressedFireClay, 1), GregTechData.FireBrick, 0.5F, 200).unlockedBy("has_compressed_fire_clay", provider.hasSafeItem(GregTechData.CompressedFireClay)).save(output, GTIRef.ID + ":firebrick");
MaterialRecipes.addSmeltingRecipe(output, provider, CRUSHED, NUGGET, 7, Cassiterite, Tin);
MaterialRecipes.addSmeltingRecipe(output, provider, CRUSHED, NUGGET, 7, Garnierite, Nickel);
MaterialRecipes.addSmeltingRecipe(output, provider, DUST, DUST_TINY, 3, AluminiumHydroxide, Alumina);
if (GregTechConfig.GAMEPLAY.HARDER_ALUMINIUM_PROCESSING) {
MaterialRecipes.addSmeltingRecipe(output, provider, DUST, DUST_TINY, 3, AluminiumHydroxide, Alumina);
MaterialRecipes.addSmeltingRecipe(output, provider, DUST, INGOT, 1, Aluminium);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import muramasa.antimatter.data.AntimatterMaterialTypes;
import muramasa.antimatter.data.AntimatterMaterials;
import muramasa.antimatter.recipe.ingredient.RecipeIngredient;
import muramasa.gregtech.GregTechConfig;
import muramasa.gregtech.data.GregTechData;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
Expand Down Expand Up @@ -38,8 +39,10 @@ public static void init() {
.add("netherized_diamond_recipe",144);
BATHING.RB().ii(DUST.getMaterialIngredient(Tungstate, 7)).fi(HydrochloricAcid.getLiquid(4000)).io(DUST.get(LithiumChloride, 4), DUST.get(TungsticAcid, 7)).add("tungstate", 512);
BATHING.RB().ii(DUST.getMaterialIngredient(Scheelite, 6)).fi(HydrochloricAcid.getLiquid(4000)).io(DUST.get(CalciumChloride, 3), DUST.get(TungsticAcid, 7)).add("scheelite", 512);
BATHING.RB().ii(DUST.getMaterialIngredient(SodiumAluminate, 4)).fi(Water.getLiquid(6000)).io(DUST.get(AluminiumHydroxide, 7), DUST.get(SodiumHydroxide, 3)).add("aluminium_hydroxide", 102 * 20);
BATHING.RB().ii(DUST.getMaterialIngredient(SodiumAluminate, 4)).fi(DistilledWater.getLiquid(6000)).io(DUST.get(AluminiumHydroxide, 7), DUST.get(SodiumHydroxide, 3)).add("aluminium_hydroxide_distilled_water", 102 * 20);
if (GregTechConfig.GAMEPLAY.HARDER_ALUMINIUM_PROCESSING){
BATHING.RB().ii(DUST.getMaterialIngredient(SodiumAluminate, 4)).fi(Water.getLiquid(6000)).io(DUST.get(AluminiumHydroxide, 7), DUST.get(SodiumHydroxide, 3)).add("aluminium_hydroxide", 102 * 20);
BATHING.RB().ii(DUST.getMaterialIngredient(SodiumAluminate, 4)).fi(DistilledWater.getLiquid(6000)).io(DUST.get(AluminiumHydroxide, 7), DUST.get(SodiumHydroxide, 3)).add("aluminium_hydroxide_distilled_water", 102 * 20);
}
mercurybathing();
persulfatebathing();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,11 @@ private static void addShared(){
if (AntimatterAPI.isModLoaded(Ref.MOD_AE)){
CHEMICAL_REACTING.RB().fi(HydrogenFluoride.getGas(4000)).ii(DUST.getMaterialIngredient(CertusQuartz, 1)).fo(Water.getLiquid(2000), HexafluorosilicicAcid.getLiquid(3000)).add("hexafluorosilicic_acid_6", 80, 16);
}
CHEMICAL_REACTING.RB().fi(HexafluorosilicicAcid.getLiquid(9000)).ii(DUST.getMaterialIngredient(Alumina, 5)).io(DUST.get(SiliconDioxide, 3)).fo(AluminiumFluoride.getLiquid(L * 8), Water.getLiquid(3000)).add("aluminium_fluoride", 224, 16);
CHEMICAL_REACTING.RB().fi(Fluorine.getGas(3000)).ii(DUST.getMaterialIngredient(Aluminium, 1)).fo(AluminiumFluoride.getLiquid(L * 4)).add("aluminium_fluoride_pure", 64, 16);
CHEMICAL_REACTING.RB().fi(HydrogenFluoride.getGas(24000)).ii(DUST.getMaterialIngredient(SodiumHydroxide, 18), DUST.getMaterialIngredient(Alumina, 5)).fo(Cryolite.getLiquid(L * 20), Water.getLiquid(27000)).add("cryolite", 752, 16);
if (GregTechConfig.GAMEPLAY.HARDER_ALUMINIUM_PROCESSING){
CHEMICAL_REACTING.RB().fi(HexafluorosilicicAcid.getLiquid(9000)).ii(DUST.getMaterialIngredient(Alumina, 5)).io(DUST.get(SiliconDioxide, 3)).fo(AluminiumFluoride.getLiquid(L * 8), Water.getLiquid(3000)).add("aluminium_fluoride", 224, 16);
CHEMICAL_REACTING.RB().fi(Fluorine.getGas(3000)).ii(DUST.getMaterialIngredient(Aluminium, 1)).fo(AluminiumFluoride.getLiquid(L * 4)).add("aluminium_fluoride_pure", 64, 16);
CHEMICAL_REACTING.RB().fi(HydrogenFluoride.getGas(24000)).ii(DUST.getMaterialIngredient(SodiumHydroxide, 18), DUST.getMaterialIngredient(Alumina, 5)).fo(Cryolite.getLiquid(L * 20), Water.getLiquid(27000)).add("cryolite", 752, 16);
}
CHEMICAL_REACTING.RB().fi(Hydrogen.getGas(6000)).ii(DUST.getMaterialIngredient(TungstenTrioxide, 4)).io(DUST.get(Tungsten)).fo(Water.getLiquid(9000)).add("tungsten", 160, 16);

}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package muramasa.gregtech.loader.machines;

import muramasa.gregtech.GregTechConfig;
import net.minecraft.world.item.ItemStack;

import static muramasa.antimatter.data.AntimatterMaterialTypes.*;
Expand All @@ -13,7 +14,9 @@ public class Dehydrator {
public static void init() {
DEHYDRATING.RB().ii(DUST.getMaterialIngredient(TungsticAcid, 7)).io(DUST.get(TungstenTrioxide, 4)).fo(DistilledWater.getLiquid(3000)).add("tungsten_trioxide", 300 * 20, 16);
DEHYDRATING.RB().fi(SaltWater.getFluidTag(1000)).io(DUST_SMALL.get(Salt, 1)).fo(DistilledWater.getLiquid(750)).add("salt_water_drying", 8 * 20, 16);
DEHYDRATING.RB().ii(DUST.getMaterialIngredient(AluminiumHydroxide, 14)).io(DUST.get(Alumina, 5)).fo(DistilledWater.getLiquid(9000)).add("alumina", 900 * 20, 16);
if (GregTechConfig.GAMEPLAY.HARDER_ALUMINIUM_PROCESSING) {
DEHYDRATING.RB().ii(DUST.getMaterialIngredient(AluminiumHydroxide, 14)).io(DUST.get(Alumina, 5)).fo(DistilledWater.getLiquid(9000)).add("alumina", 900 * 20, 16);
}
//Waste Processing
DEHYDRATING.RB().ii(of(ThoriumWaste)).fi(SulfuricAcid.getLiquid(100)).io(new ItemStack(NuclearWaste),DUST_SMALL.get(Rhodium,4)).add("thorium_waste_reprocessing",500,8);
DEHYDRATING.RB().ii(of(ProtactiniumWaste)).fi(SulfuricAcid.getLiquid(100)).io(new ItemStack(NuclearWaste),DUST_SMALL.get(Rhodium,2),DUST_SMALL.get(Palladium,2)).add("protactinium_waste_reprocessing",500,8);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@

import earth.terrarium.botarium.common.fluid.base.FluidHolder;
import muramasa.antimatter.data.AntimatterMaterialTypes;
import muramasa.antimatter.material.Material;
import muramasa.antimatter.material.MaterialTags;
import muramasa.antimatter.recipe.ingredient.RecipeIngredient;
import muramasa.antimatter.recipe.map.RecipeBuilder;
import muramasa.gregtech.GregTechConfig;
import muramasa.gregtech.data.GregTechMaterialTags;
import muramasa.gregtech.data.Materials;
import net.minecraft.tags.ItemTags;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.crafting.Ingredient;

import java.util.ArrayList;
import java.util.List;

import static muramasa.antimatter.Ref.L;
import static muramasa.antimatter.data.AntimatterMaterialTypes.*;
import static muramasa.antimatter.data.AntimatterMaterials.Charcoal;
Expand All @@ -22,15 +27,19 @@

public class ElectrolyzerLoader {
public static void init() {
ELEC.all().forEach(t -> {
List<Material> elecMaterials = new ArrayList<>(ELEC.all().stream().toList());
if (!GregTechConfig.GAMEPLAY.HARDER_ALUMINIUM_PROCESSING){
elecMaterials.add(Alumina);
}
elecMaterials.forEach(t -> {
if (!t.has(DUST) && !t.has(LIQUID) && !t.has(GAS)) return;
FluidHolder[] fluids = t.getProcessInto().stream().filter(mat -> ((mat.m.has(GAS) || mat.m.has(AntimatterMaterialTypes.LIQUID)) && !mat.m.has(AntimatterMaterialTypes.DUST))).map(mat -> mat.m.has(GAS) ? mat.m.getGas(mat.s*1000) : mat.m.getLiquid(mat.s*1000)).toArray(FluidHolder[]::new);
for (FluidHolder fluid : fluids) {
if (fluid.isEmpty())
return;
}
if (fluids.length > 6) return;
int euPerTick = t.has(ELEC30) ? 30 : t.has(ELEC60) ? 60 : t.has(ELEC90) ? 90 : 120;
int euPerTick = t.has(ELEC30) ? 30 : t.has(ELEC60) || t == Alumina ? 60 : t.has(ELEC90) ? 90 : 120;
ItemStack[] items = t.getProcessInto().stream().filter(mat -> mat.m.has(AntimatterMaterialTypes.DUST)).map(mat -> AntimatterMaterialTypes.DUST.get(mat.m, mat.s)).toArray(ItemStack[]::new);
int inputAmount = MaterialTags.PROCESS_INTO.get(t).getRight() > 0 ? MaterialTags.PROCESS_INTO.get(t).getRight() : t.getProcessInto().stream().mapToInt(mat -> mat.s).sum();
RecipeBuilder b = ELECTROLYZING.RB();
Expand All @@ -44,21 +53,23 @@ public static void init() {
});
ELECTROLYZING.RB().ii(RecipeIngredient.of(ItemTags.SAND, 8)).io(DUST.get(Materials.SiliconDioxide)).add("sand_to_silicon_dioxide", 500, 25);
ELECTROLYZING.RB().ii(RecipeIngredient.of(Items.BONE_MEAL, 3)).io(DUST.get(Materials.Calcium)).add("bone_meal", 98, 26);
ELECTROLYZING.RB().ii(DUST.getMaterialIngredient(Carbon, 3), DUST.getMaterialIngredient(Alumina, 10))
.fi(AluminiumFluoride.getLiquid(L / 36), Cryolite.getLiquid(L / 72)).io(DUST.get(Aluminium, 4))
.fo(CarbonDioxide.getGas(9000), Fluorine.getGas(29)).add("alumina_carbon", 2040, 16);
ELECTROLYZING.RB().ii(DUST.getMaterialIngredient(Charcoal, 3), DUST.getMaterialIngredient(Alumina, 10))
.fi(AluminiumFluoride.getLiquid(L / 36), Cryolite.getLiquid(L / 72)).io(DUST.get(Aluminium, 4))
.fo(CarbonDioxide.getGas(9000), Fluorine.getGas(29)).add("alumina_charcoal", 2040, 16);
ELECTROLYZING.RB().ii(DUST.getMaterialIngredient(Coal, 3), DUST.getMaterialIngredient(Alumina, 10))
.fi(AluminiumFluoride.getLiquid(L / 36), Cryolite.getLiquid(L / 72)).io(DUST.get(Aluminium, 4))
.fo(CarbonDioxide.getGas(9000), Fluorine.getGas(29)).add("alumina_coal", 2040, 16);
ELECTROLYZING.RB().ii(DUST.getMaterialIngredient(CoalCoke, 3), DUST.getMaterialIngredient(Alumina, 10))
.fi(AluminiumFluoride.getLiquid(L / 36), Cryolite.getLiquid(L / 72)).io(DUST.get(Aluminium, 4))
.fo(CarbonDioxide.getGas(9000), Fluorine.getGas(29)).add("alumina_coke", 2040, 16);
ELECTROLYZING.RB().ii(DUST.getMaterialIngredient(Graphite, 3), DUST.getMaterialIngredient(Alumina, 10))
.fi(AluminiumFluoride.getLiquid(L / 36), Cryolite.getLiquid(L / 72)).io(DUST.get(Aluminium, 4))
.fo(CarbonDioxide.getGas(9000), Fluorine.getGas(29)).add("alumina_graphite", 2040, 16);
if (GregTechConfig.GAMEPLAY.HARDER_ALUMINIUM_PROCESSING) {
ELECTROLYZING.RB().ii(DUST.getMaterialIngredient(Carbon, 3), DUST.getMaterialIngredient(Alumina, 10))
.fi(AluminiumFluoride.getLiquid(L / 36), Cryolite.getLiquid(L / 72)).io(DUST.get(Aluminium, 4))
.fo(CarbonDioxide.getGas(9000), Fluorine.getGas(29)).add("alumina_carbon", 2040, 16);
ELECTROLYZING.RB().ii(DUST.getMaterialIngredient(Charcoal, 3), DUST.getMaterialIngredient(Alumina, 10))
.fi(AluminiumFluoride.getLiquid(L / 36), Cryolite.getLiquid(L / 72)).io(DUST.get(Aluminium, 4))
.fo(CarbonDioxide.getGas(9000), Fluorine.getGas(29)).add("alumina_charcoal", 2040, 16);
ELECTROLYZING.RB().ii(DUST.getMaterialIngredient(Coal, 3), DUST.getMaterialIngredient(Alumina, 10))
.fi(AluminiumFluoride.getLiquid(L / 36), Cryolite.getLiquid(L / 72)).io(DUST.get(Aluminium, 4))
.fo(CarbonDioxide.getGas(9000), Fluorine.getGas(29)).add("alumina_coal", 2040, 16);
ELECTROLYZING.RB().ii(DUST.getMaterialIngredient(CoalCoke, 3), DUST.getMaterialIngredient(Alumina, 10))
.fi(AluminiumFluoride.getLiquid(L / 36), Cryolite.getLiquid(L / 72)).io(DUST.get(Aluminium, 4))
.fo(CarbonDioxide.getGas(9000), Fluorine.getGas(29)).add("alumina_coke", 2040, 16);
ELECTROLYZING.RB().ii(DUST.getMaterialIngredient(Graphite, 3), DUST.getMaterialIngredient(Alumina, 10))
.fi(AluminiumFluoride.getLiquid(L / 36), Cryolite.getLiquid(L / 72)).io(DUST.get(Aluminium, 4))
.fo(CarbonDioxide.getGas(9000), Fluorine.getGas(29)).add("alumina_graphite", 2040, 16);
}
}

}
29 changes: 19 additions & 10 deletions common/src/main/java/muramasa/gregtech/loader/multi/Blasting.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import muramasa.antimatter.material.Material;
import muramasa.antimatter.recipe.ingredient.RecipeIngredient;
import muramasa.gregtech.GTIRef;
import muramasa.gregtech.GregTechConfig;
import muramasa.gregtech.data.GregTechMaterialTags;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
Expand Down Expand Up @@ -107,16 +108,24 @@ public static void init() {
.fi(Oxygen.getGas(1000))
.io(INGOT.get(Steel), DUST_SMALL.get(DarkAsh))
.add("steel_ingot_2", 100, 120);
/* Aluminium*/
BLASTING.RB().temperature(1200).ii(DUST.getMaterialIngredient(Ruby, 1))
.io(NUGGET.get(Aluminium, 3), DUST_TINY.get(DarkAsh, 1))
.add("aluminium_ingot_from_ruby", 400, 100);
BLASTING.RB().temperature(1200).ii(DUST.getMaterialIngredient(Sapphire, 1))
.io(NUGGET.get(Aluminium, 3))
.add("aluminium_ingot_from_blue_sapphire", 400, 100);
BLASTING.RB().temperature(1200).ii(DUST.getMaterialIngredient(GreenSapphire, 1))
.io(NUGGET.get(Aluminium, 3), DUST_TINY.get(DarkAsh, 1))
.add("aluminium_ingot_from_green_sapphire", 400, 100);
if (!GregTechConfig.GAMEPLAY.HARDER_ALUMINIUM_PROCESSING){
/* Aluminium*/
BLASTING.RB().temperature(1200).ii(DUST.getMaterialIngredient(Ruby, 1))
.io(NUGGET.get(Aluminium, 3), DUST_TINY.get(DarkAsh, 1))
.add("aluminium_ingot_from_ruby", 400, 100);
BLASTING.RB().temperature(1200).ii(DUST.getMaterialIngredient(Sapphire, 1))
.io(NUGGET.get(Aluminium, 3))
.add("aluminium_ingot_from_blue_sapphire", 400, 100);
BLASTING.RB().temperature(1200).ii(DUST.getMaterialIngredient(GreenSapphire, 1))
.io(NUGGET.get(Aluminium, 3), DUST_TINY.get(DarkAsh, 1))
.add("aluminium_ingot_from_green_sapphire", 400, 100);
int heat = GregTechMaterialTags.BLAST_FURNACE_TEMP.getInt(Aluminium);
BLASTING.RB().temperature(1700).ii(DUST.getMaterialIngredient(Aluminium, 1), INT_CIRCUITS.get(1)).io(INGOT.get(Aluminium)).add( "aluminium_ingot_from_aluminium_dust", Math.max(Aluminium.getMass() / 40L, 1L) * heat, 120);
BLASTING.RB().ii(DUST.getMaterialIngredient(Alumina, 4), DUST.getMaterialIngredient(Calcite, 1)).io(INGOT.get(Aluminium)).add("alumina_calcite", 4 * 100, 120);
BLASTING.RB().ii(DUST.getMaterialIngredient(Alumina, 4), DUST.getMaterialIngredient(Limestone, 1)).io(INGOT.get(Aluminium)).add("alumina_limestone", 4 * 100, 120);
BLASTING.RB().ii(DUST.getMaterialIngredient(Alumina, 4), DUST.getMaterialIngredient(Marble, 1)).io(INGOT.get(Aluminium)).add("alumina_marble", 4 * 100, 120);
}

/* Stainless Steel*/
BLASTING.RB().temperature(1700).ii(DUST.getMaterialIngredient(AntimatterMaterials.Iron, 6), DUST.getMaterialIngredient(Nickel, 1), DUST.getMaterialIngredient(Manganese, 1), DUST.getMaterialIngredient(Chromium, 1))
.io(INGOT.get(StainlessSteel, 9), DUST_SMALL.get(DarkAsh, 1))
Expand Down

0 comments on commit 5053ad1

Please sign in to comment.