Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nuke-ic2-recipes #83

Merged
merged 6 commits into from
Sep 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
236 changes: 122 additions & 114 deletions src/main/java/emt/init/EMTRecipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.oredict.OreDictionary;

import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.GameRegistry;
import emt.EMT;
import emt.util.EMTConfigHandler;
Expand Down Expand Up @@ -1091,54 +1092,58 @@ public static void registerLateRecipes() {

/** IC2 Stuff related recipes **/

/* Ore Clusters Macerator Recipes */
ItemStack ironClusterRecipe = IC2Items.getItem("smallIronDust").copy();
ironClusterRecipe.stackSize = 22;
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 16)),
null,
true,
ironClusterRecipe);

ItemStack goldClusterRecipe = IC2Items.getItem("smallGoldDust").copy();
goldClusterRecipe.stackSize = 22;
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 31)),
null,
true,
goldClusterRecipe);

ItemStack copperClusterRecipe = IC2Items.getItem("smallCopperDust").copy();
copperClusterRecipe.stackSize = 22;
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 17)),
null,
true,
copperClusterRecipe);

ItemStack tinClusterRecipe = IC2Items.getItem("smallTinDust").copy();
tinClusterRecipe.stackSize = 22;
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 18)),
null,
true,
tinClusterRecipe);

ItemStack silverClusterRecipe = IC2Items.getItem("smallSilverDust").copy();
silverClusterRecipe.stackSize = 22;
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 19)),
null,
true,
silverClusterRecipe);

ItemStack leadClusterRecipe = IC2Items.getItem("smallLeadDust").copy();
leadClusterRecipe.stackSize = 22;
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 20)),
null,
true,
leadClusterRecipe);
final boolean isDreamcraftNotLoaded = !Loader.isModLoaded("dreamcraft");

if (isDreamcraftNotLoaded) {
/* Ore Clusters Macerator Recipes */
ItemStack ironClusterRecipe = IC2Items.getItem("smallIronDust").copy();
ironClusterRecipe.stackSize = 22;
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 16)),
null,
true,
ironClusterRecipe);

ItemStack goldClusterRecipe = IC2Items.getItem("smallGoldDust").copy();
goldClusterRecipe.stackSize = 22;
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 31)),
null,
true,
goldClusterRecipe);

ItemStack copperClusterRecipe = IC2Items.getItem("smallCopperDust").copy();
copperClusterRecipe.stackSize = 22;
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 17)),
null,
true,
copperClusterRecipe);

ItemStack tinClusterRecipe = IC2Items.getItem("smallTinDust").copy();
tinClusterRecipe.stackSize = 22;
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 18)),
null,
true,
tinClusterRecipe);

ItemStack silverClusterRecipe = IC2Items.getItem("smallSilverDust").copy();
silverClusterRecipe.stackSize = 22;
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 19)),
null,
true,
silverClusterRecipe);

ItemStack leadClusterRecipe = IC2Items.getItem("smallLeadDust").copy();
leadClusterRecipe.stackSize = 22;
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 20)),
null,
true,
leadClusterRecipe);
}

/* Thaumium Plates Recipes */
thaumiumPlate = GameRegistry.addShapedRecipe(
Expand All @@ -1152,76 +1157,79 @@ public static void registerLateRecipes() {
new ItemStack(IC2Items.getItem("ForgeHammer").getItem(), 1, OreDictionary.WILDCARD_VALUE),
'Z',
new ItemStack(Blocks.obsidian));
Recipes.metalformerRolling.addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigItems.itemResource, 1, 2)),
null,
new ItemStack(EMTItems.itemEMTItems, 1, 5));

/* Ore Processing for Amber and Cinnabar */
if (EMTConfigHandler.removeAmberAndCinnabarMacerating) {
for (Iterator<IRecipeInput> it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext();) {
IRecipeInput input = it.next();
if (input.matches(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7))) {
it.remove();
EMT.LOGGER.info("Removing conflicting amber macerating recipe(s)");

if (isDreamcraftNotLoaded) {
Recipes.metalformerRolling.addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigItems.itemResource, 1, 2)),
null,
new ItemStack(EMTItems.itemEMTItems, 1, 5));

/* Ore Processing for Amber and Cinnabar */
if (EMTConfigHandler.removeAmberAndCinnabarMacerating) {
for (Iterator<IRecipeInput> it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext();) {
IRecipeInput input = it.next();
if (input.matches(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7))) {
it.remove();
EMT.LOGGER.info("Removing conflicting amber macerating recipe(s)");
}
}
}

for (Iterator<IRecipeInput> it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext();) {
IRecipeInput input = it.next();
if (input.matches(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0))) {
it.remove();
EMT.LOGGER.info("Removing Conflicting cinnabar macerating recipe(s)");
for (Iterator<IRecipeInput> it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext();) {
IRecipeInput input = it.next();
if (input.matches(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0))) {
it.remove();
EMT.LOGGER.info("Removing Conflicting cinnabar macerating recipe(s)");
}
}
}
ItemStack crushedAmberRecipe = new ItemStack(EMTItems.itemEMTItems, 1, 1);
crushedAmberRecipe.stackSize = 2;
Recipes.macerator.addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7)),
null,
crushedAmberRecipe);

ItemStack crushedCinnabarRecipe = new ItemStack(EMTItems.itemEMTItems, 1, 3);
crushedCinnabarRecipe.stackSize = 2;
Recipes.macerator.addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0)),
null,
crushedCinnabarRecipe);

NBTTagCompound waterAmount = new NBTTagCompound();
waterAmount.setInteger("amount", 1000);

ItemStack smallCopperDust = IC2Items.getItem("smallCopperDust");
smallCopperDust.stackSize = 2;
ItemStack smallTinDust = IC2Items.getItem("smallTinDust");
smallCopperDust.stackSize = 2;

Recipes.oreWashing.addRecipe(
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 1)),
waterAmount,
new ItemStack(EMTItems.itemEMTItems, 1, 2),
smallCopperDust,
IC2Items.getItem("stoneDust"));
Recipes.oreWashing.addRecipe(
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 3)),
waterAmount,
new ItemStack(EMTItems.itemEMTItems, 1, 4),
smallTinDust,
IC2Items.getItem("stoneDust"));

NBTTagCompound heatAmount = new NBTTagCompound();
heatAmount.setInteger("minHeat", 1000);

Recipes.centrifuge.addRecipe(
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 2)),
heatAmount,
IC2Items.getItem("smallCopperDust"),
new ItemStack(ConfigItems.itemResource, 1, 6));
Recipes.centrifuge.addRecipe(
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 4)),
heatAmount,
IC2Items.getItem("smallTinDust"),
new ItemStack(ConfigItems.itemResource, 1, 3));
}
ItemStack crushedAmberRecipe = new ItemStack(EMTItems.itemEMTItems, 1, 1);
crushedAmberRecipe.stackSize = 2;
Recipes.macerator.addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7)),
null,
crushedAmberRecipe);

ItemStack crushedCinnabarRecipe = new ItemStack(EMTItems.itemEMTItems, 1, 3);
crushedCinnabarRecipe.stackSize = 2;
Recipes.macerator.addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0)),
null,
crushedCinnabarRecipe);

NBTTagCompound waterAmount = new NBTTagCompound();
waterAmount.setInteger("amount", 1000);

ItemStack smallCopperDust = IC2Items.getItem("smallCopperDust");
smallCopperDust.stackSize = 2;
ItemStack smallTinDust = IC2Items.getItem("smallTinDust");
smallCopperDust.stackSize = 2;

Recipes.oreWashing.addRecipe(
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 1)),
waterAmount,
new ItemStack(EMTItems.itemEMTItems, 1, 2),
smallCopperDust,
IC2Items.getItem("stoneDust"));
Recipes.oreWashing.addRecipe(
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 3)),
waterAmount,
new ItemStack(EMTItems.itemEMTItems, 1, 4),
smallTinDust,
IC2Items.getItem("stoneDust"));

NBTTagCompound heatAmount = new NBTTagCompound();
heatAmount.setInteger("minHeat", 1000);

Recipes.centrifuge.addRecipe(
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 2)),
heatAmount,
IC2Items.getItem("smallCopperDust"),
new ItemStack(ConfigItems.itemResource, 1, 6));
Recipes.centrifuge.addRecipe(
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 4)),
heatAmount,
IC2Items.getItem("smallTinDust"),
new ItemStack(ConfigItems.itemResource, 1, 3));
}
}