Skip to content

Commit

Permalink
Adjust/added a few recipes (#8174)
Browse files Browse the repository at this point in the history
- Switched infused alloy from using iron to using copper
- Added alternate circuit recipes that let you save on the ingot, but use more infuse materials
- Allow making enriched iron from iron dust
  • Loading branch information
thiakil committed Aug 20, 2024
1 parent b74b68b commit 62a305b
Show file tree
Hide file tree
Showing 13 changed files with 99 additions and 10 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ private void addAdvancements() {
add(MekanismAdvancements.STEEL_INGOT, "Industrial Revolution", "Infuse Iron with Carbon and repeat");
add(MekanismAdvancements.STEEL_CASING, "The Perfect Foundation", "Used in even the most advanced machines");

add(MekanismAdvancements.INFUSED_ALLOY, "The Alloy That Started it All", "Infuse Iron with Redstone");
add(MekanismAdvancements.INFUSED_ALLOY, "The Alloy That Started it All", "Infuse Copper with Redstone");
add(MekanismAdvancements.REINFORCED_ALLOY, "Make it Stronger", "Diamonds make everything better!");
add(MekanismAdvancements.ATOMIC_ALLOY, "Top Tier Alloy", "Create one of the strongest alloys in existence");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package mekanism.common.recipe.impl;

import mekanism.api.MekanismAPITags;
import mekanism.api.chemical.Chemical;
import mekanism.api.datagen.recipe.builder.ItemStackChemicalToItemStackRecipeBuilder;
import mekanism.api.providers.IItemProvider;
import mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess;
Expand Down Expand Up @@ -35,6 +36,11 @@ public void addRecipes(RecipeOutput consumer, HolderLookup.Provider registries)
addCircuitUpgradeRecipe(consumer, MekanismItems.ADVANCED_CONTROL_CIRCUIT, MekanismTags.Items.CIRCUITS_BASIC, MekanismTags.Items.ALLOYS_INFUSED, basePath, "advanced");
addCircuitUpgradeRecipe(consumer, MekanismItems.ELITE_CONTROL_CIRCUIT, MekanismTags.Items.CIRCUITS_ADVANCED, MekanismTags.Items.ALLOYS_REINFORCED, basePath, "elite");
addCircuitUpgradeRecipe(consumer, MekanismItems.ULTIMATE_CONTROL_CIRCUIT, MekanismTags.Items.CIRCUITS_ELITE, MekanismTags.Items.ALLOYS_ATOMIC, basePath, "ultimate");

//infusion variants that save on the base ingots needed, but take extra infusion material
addCircuitInfusionUpgrade(consumer, MekanismItems.ADVANCED_CONTROL_CIRCUIT, MekanismTags.Items.CIRCUITS_BASIC, MekanismAPITags.Chemicals.REDSTONE, 10, basePath, "advanced");
addCircuitInfusionUpgrade(consumer, MekanismItems.ELITE_CONTROL_CIRCUIT, MekanismTags.Items.CIRCUITS_ADVANCED, MekanismAPITags.Chemicals.DIAMOND, 20, basePath, "elite");
addCircuitInfusionUpgrade(consumer, MekanismItems.ULTIMATE_CONTROL_CIRCUIT, MekanismTags.Items.CIRCUITS_ELITE, MekanismAPITags.Chemicals.REFINED_OBSIDIAN, 40, basePath, "ultimate");
}

private void addCircuitUpgradeRecipe(RecipeOutput consumer, IItemProvider output, TagKey<Item> circuitTag, TagKey<Item> alloyTag, String basePath,
Expand All @@ -45,4 +51,13 @@ private void addCircuitUpgradeRecipe(RecipeOutput consumer, IItemProvider output
.key(Pattern.ALLOY, alloyTag)
.build(consumer, Mekanism.rl(basePath + name));
}

private void addCircuitInfusionUpgrade(RecipeOutput consumer, IItemProvider output, TagKey<Item> circuitTag, TagKey<Chemical> infusionType, int singleAlloyAmount, String basePath, String name) {
ItemStackChemicalToItemStackRecipeBuilder.metallurgicInfusing(
IngredientCreatorAccess.item().from(circuitTag),
IngredientCreatorAccess.chemicalStack().from(infusionType, singleAlloyAmount * 6), /* 3x 2 alloys */
output.getItemStack(),
false
).build(consumer, Mekanism.rl(basePath + "infused_" + name));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void addRecipes(RecipeOutput consumer, HolderLookup.Provider registries)
private void addMetallurgicInfuserAlloyRecipes(RecipeOutput consumer, String basePath) {
//Infused
ItemStackChemicalToItemStackRecipeBuilder.metallurgicInfusing(
IngredientCreatorAccess.item().from(Tags.Items.INGOTS_IRON),
IngredientCreatorAccess.item().from(Tags.Items.INGOTS_COPPER),
IngredientCreatorAccess.chemicalStack().from(MekanismAPITags.Chemicals.REDSTONE, 10),
MekanismItems.INFUSED_ALLOY.getItemStack(),
false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ public void addRecipes(RecipeOutput consumer, HolderLookup.Provider registries)
MekanismItems.ENRICHED_IRON.getItemStack(),
false
).build(consumer, Mekanism.rl(basePath + "iron/enriched"));
ItemStackChemicalToItemStackRecipeBuilder.metallurgicInfusing(
IngredientCreatorAccess.item().from(MekanismTags.Items.PROCESSED_RESOURCES.get(ResourceType.DUST, PrimaryResource.IRON)),
IngredientCreatorAccess.chemicalStack().from(MekanismAPITags.Chemicals.CARBON, 10),
MekanismItems.ENRICHED_IRON.getItemStack(),
false
).build(consumer, Mekanism.rl(basePath + "iron/enriched_dust"));
addNetheriteProcessingRecipes(consumer, basePath + "netherite/");
addBronzeProcessingRecipes(consumer, basePath + "bronze/");
addCoalOreProcessingRecipes(consumer, basePath + "coal/");
Expand Down

0 comments on commit 62a305b

Please sign in to comment.