Skip to content

Commit

Permalink
Godforge finale (#3080)
Browse files Browse the repository at this point in the history
Co-authored-by: BucketBrigade <138534411+CookieBrigade@users.noreply.github.com>
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Co-authored-by: serenibyss <10861407+serenibyss@users.noreply.github.com>
  • Loading branch information
4 people committed Sep 15, 2024
1 parent 6d4894f commit dda786c
Show file tree
Hide file tree
Showing 47 changed files with 2,024 additions and 427 deletions.
7 changes: 6 additions & 1 deletion src/main/java/bartworks/MainMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
import gregtech.api.enums.Mods;
import gregtech.api.recipe.RecipeMap;
import gregtech.api.recipe.check.CheckRecipeResultRegistry;
import tectech.loader.recipe.Godforge;

@Mod(
modid = MainMod.MOD_ID,
Expand Down Expand Up @@ -202,13 +203,17 @@ public static void runOnPlayerJoined(boolean classicMode, boolean disableExtraGa
BioVatLogicAdder.RadioHatch.runBasicItemIntegration();
if (!recipesAdded) {
StaticRecipeChangeLoaders.addEBFGasRecipes();
recipesAdded = true;
}

// Accept recipe map changes into Buffers
RecipeMap.ALL_RECIPE_MAPS.values()
.forEach(
map -> map.getBackend()
.reInit());

// because the above code runs so late that I couldn't find anywhere else to call this
if (!recipesAdded) Godforge.initMoltenModuleRecipes();

recipesAdded = true;
}
}
6 changes: 6 additions & 0 deletions src/main/java/gregtech/api/util/GTRecipeConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ public class GTRecipeConstants {
public static final RecipeMetadataKey<Integer> FOG_PLASMA_TIER = SimpleRecipeMetadataKey
.create(Integer.class, "fog_plasma_tier");

/**
* FOG Plasma multistep requirement.
*/
public static final RecipeMetadataKey<Boolean> FOG_PLASMA_MULTISTEP = SimpleRecipeMetadataKey
.create(Boolean.class, "fog_plasma_multistep");

/**
* DEFC Casing tier.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import net.minecraftforge.fluids.FluidStack;

import bartworks.system.material.WerkstoffLoader;
import goodgenerator.items.GGMaterial;
import gregtech.GTMod;
import gregtech.api.enums.GTValues;
import gregtech.api.enums.ItemList;
Expand Down Expand Up @@ -664,6 +665,20 @@ public void registerBlastFurnaceRecipes() {
.metadata(COIL_HEAT, 17000)
.addTo(blastFurnaceRecipes);

GTValues.RA.stdBuilder()
.itemInputs(
ItemList.Phononic_Seed_Crystal.get(2),
MaterialsUEVplus.Eternity.getDust(8),
GGMaterial.shirabon.get(OrePrefixes.dust, 8),
GTUtility.getIntegratedCircuit(2))
.fluidInputs(MaterialsUEVplus.Mellion.getMolten(512 * 144L))
.fluidOutputs(MaterialsUEVplus.PhononCrystalSolution.getFluid(3000))
.duration(200 * SECONDS)
.eut((int) TierEU.RECIPE_UXV)
.metadata(COIL_HEAT, 50000)
.noOptimize()
.addTo(blastFurnaceRecipes);

GTValues.RA.stdBuilder()
.itemInputs(MaterialsUEVplus.Mellion.getDust(1), GTUtility.getIntegratedCircuit(11))
.itemOutputs(GTOreDictUnificator.get(OrePrefixes.ingotHot, MaterialsUEVplus.Mellion, 1))
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/tectech/loader/TecTechConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ public TecTechConfig(File pConfigBaseDirectory, String pModCollectionDirectory,
// final static to allow compiler to remove the debug code when this is false
public static boolean DEBUG_MODE = false;
public static boolean POWERLESS_MODE = false;
/**
* Not complete; enabled by default only in dev env
*/
public boolean ENABLE_GOD_FORGE;

public boolean BOOM_ENABLE;
public boolean DISABLE_BLOCK_HARDNESS_NERF;
public boolean EASY_SCAN;
Expand Down
1 change: 0 additions & 1 deletion src/main/java/tectech/loader/recipe/BaseRecipeLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public void run() {
new Crafting().run();
new Extractor().run();
new ResearchStationAssemblyLine().run();
} else {
new Godforge().run();
}
}
Expand Down
398 changes: 273 additions & 125 deletions src/main/java/tectech/loader/recipe/Godforge.java

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions src/main/java/tectech/recipe/GodforgePlasmaFrontend.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package tectech.recipe;

import static gregtech.api.util.GTRecipeConstants.FOG_PLASMA_MULTISTEP;
import static gregtech.api.util.GTRecipeConstants.FOG_PLASMA_TIER;
import static gregtech.api.util.GTUtility.trans;
import static net.minecraft.util.StatCollector.translateToLocal;

Expand Down Expand Up @@ -52,11 +54,10 @@ protected void drawEnergyInfo(RecipeDisplayInfo recipeInfo) {
long eut = recipeInfo.recipe.mEUt;
long duration = recipeInfo.recipe.mDuration;
String multistep = "No";
if (recipeInfo.recipe.mSpecialItems.toString()
.equals("true")) {
if (recipeInfo.recipe.getMetadataOrDefault(FOG_PLASMA_MULTISTEP, false)) {
multistep = "Yes";
}
String requiredUpgrade = switch (recipeInfo.recipe.mSpecialValue) {
String requiredUpgrade = switch (recipeInfo.recipe.getMetadataOrDefault(FOG_PLASMA_TIER, 0)) {
case 1 -> "T4-T5";
case 2 -> "Exotic";
default -> "T1-T3";
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/tectech/recipe/TecTechRecipeMaps.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import gregtech.api.recipe.RecipeMapBackend;
import gregtech.api.recipe.RecipeMapBuilder;
import gregtech.api.util.GTRecipe;
import gregtech.nei.formatter.HeatingCoilSpecialValueFormatter;
import tectech.thing.CustomItemList;
import tectech.thing.gui.TecTechUITextures;

Expand Down Expand Up @@ -74,5 +75,14 @@ public static void init() {}
.neiTransferRect(78, 33, 20, 20)
.frontend(GodforgeExoticFrontend::new)
.build();
public static final RecipeMap<RecipeMapBackend> godforgeMoltenRecipes = RecipeMapBuilder.of("gt.recipe.fog_molten")
.maxIO(6, 6, 1, 2)
.minInputs(1, 0)
.progressBar(TecTechUITextures.PROGRESSBAR_GODFORGE_PLASMA, ProgressBar.Direction.RIGHT)
.neiSpecialInfoFormatter(HeatingCoilSpecialValueFormatter.INSTANCE)
.logo(TecTechUITextures.PICTURE_GODFORGE_LOGO)
.logoSize(18, 18)
.logoPos(151, 63)
.build();

}
Loading

0 comments on commit dda786c

Please sign in to comment.