Skip to content

Commit

Permalink
Recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
Zorbatron committed Sep 11, 2024
1 parent 6a4384e commit c19b301
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/main/java/com/zorbatron/zbgt/recipe/MiscRecipes.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
package com.zorbatron.zbgt.recipe;

import static gregtech.api.GTValues.*;
import static gregtech.api.recipes.RecipeMaps.COMPRESSOR_RECIPES;
import static gregtech.api.recipes.RecipeMaps.POLARIZER_RECIPES;
import static gregtech.api.recipes.RecipeMaps.*;
import static gregtech.api.unification.material.Materials.*;

import com.zorbatron.zbgt.ZBGTConfig;
import com.zorbatron.zbgt.recipe.helpers.RecipeAssists;

import gregtech.api.unification.ore.OrePrefix;

public class MiscRecipes {

protected static void init() {
magneticFluids();
genericCircuits();

if (ZBGTConfig.recipeSettings.enableSillyRecipes) {
sillyRecipes();
Expand Down Expand Up @@ -43,6 +46,17 @@ private static void magneticFluids() {
.buildAndRegister();
}

private static void genericCircuits() {
for (int tier = ULV; tier <= MAX; tier++) {
ASSEMBLER_RECIPES.recipeBuilder()
.input(OrePrefix.circuit, RecipeAssists.getMarkerMaterialByTier(tier), 16)
.circuitMeta(29)
.output(RecipeAssists.getGenericCircuitByTier(tier), 16)
.EUt(8).duration(20)
.buildAndRegister();
}
}

private static void sillyRecipes() {
COMPRESSOR_RECIPES.recipeBuilder()
.fluidInputs(Water.getFluid(Integer.MAX_VALUE))
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/com/zorbatron/zbgt/recipe/helpers/RecipeAssists.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.zorbatron.zbgt.recipe.helpers;

import static com.zorbatron.zbgt.common.items.ZBGTMetaItems.*;
import static gregtech.api.GTValues.*;
import static gregtech.api.unification.material.Materials.*;
import static gregtech.common.items.MetaItems.*;
Expand Down Expand Up @@ -41,6 +42,26 @@ public static Material getMarkerMaterialByTier(int tier) {
};
}

public static MetaItem<?>.MetaValueItem getGenericCircuitByTier(int tier) {
return switch (tier) {
case (1) -> GENERIC_CIRCUIT_LV;
case (2) -> GENERIC_CIRCUIT_MV;
case (3) -> GENERIC_CIRCUIT_HV;
case (4) -> GENERIC_CIRCUIT_EV;
case (5) -> GENERIC_CIRCUIT_IV;
case (6) -> GENERIC_CIRCUIT_LuV;
case (7) -> GENERIC_CIRCUIT_ZPM;
case (8) -> GENERIC_CIRCUIT_UV;
case (9) -> GENERIC_CIRCUIT_UHV;
case (10) -> GENERIC_CIRCUIT_UEV;
case (11) -> GENERIC_CIRCUIT_UIV;
case (12) -> GENERIC_CIRCUIT_UXV;
case (13) -> GENERIC_CIRCUIT_OpV;
case (14) -> GENERIC_CIRCUIT_MAX;
default -> GENERIC_CIRCUIT_ULV;
};
}

public static Material getMaterialByTier(int tier) {
return switch (tier) {
case (LV) -> Steel;
Expand Down

0 comments on commit c19b301

Please sign in to comment.