From b20324506e88accd5400024a17799b3243f1266f Mon Sep 17 00:00:00 2001 From: Alexdoru <57050655+Alexdoru@users.noreply.github.com> Date: Mon, 2 Sep 2024 00:43:25 +0200 Subject: [PATCH 1/4] nuke-ic2-recipes --- src/main/java/emt/init/EMTRecipes.java | 236 +++++++++++++------------ 1 file changed, 122 insertions(+), 114 deletions(-) diff --git a/src/main/java/emt/init/EMTRecipes.java b/src/main/java/emt/init/EMTRecipes.java index 1dbb3be3..12c89a06 100644 --- a/src/main/java/emt/init/EMTRecipes.java +++ b/src/main/java/emt/init/EMTRecipes.java @@ -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; @@ -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 isDreamcraftLoaded = Loader.isModLoaded("dreamcraft"); + + if (isDreamcraftLoaded) { + /* 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( @@ -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 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 (isDreamcraftLoaded) { + 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 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 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 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)); } } From 620d82d3bbe255422e6ef29fb5414c79f5fb8a3d Mon Sep 17 00:00:00 2001 From: Martin Robertz Date: Mon, 2 Sep 2024 08:12:40 +0200 Subject: [PATCH 2/4] update --- dependencies.gradle | 2 +- settings.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dependencies.gradle b/dependencies.gradle index a3e4614f..af2fb81c 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,7 +1,7 @@ // Add your dependencies here dependencies { - compileOnly 'com.github.GTNewHorizons:GT5-Unofficial:5.09.49.42:dev' + compileOnly 'com.github.GTNewHorizons:GT5-Unofficial:5.09.49.47:dev' api 'com.github.GTNewHorizons:Baubles:1.0.4:dev' api 'com.github.GTNewHorizons:ModularUI:1.2.0:dev' api ('com.github.GTNewHorizons:ThaumicBoots:1.3.7:dev'){ diff --git a/settings.gradle b/settings.gradle index 54797868..242692e5 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,7 +17,7 @@ pluginManagement { } plugins { - id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.25' + id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.26' } From 64ef25dcb851b2d7c3b4448e1f09419f8ccab027 Mon Sep 17 00:00:00 2001 From: Martin Robertz Date: Tue, 3 Sep 2024 22:55:21 +0200 Subject: [PATCH 3/4] update --- dependencies.gradle | 6 +++--- settings.gradle | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dependencies.gradle b/dependencies.gradle index 91ede356..6a045b43 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,10 +1,10 @@ // Add your dependencies here dependencies { - compileOnly 'com.github.GTNewHorizons:GT5-Unofficial:5.09.49.55:dev' + compileOnly 'com.github.GTNewHorizons:GT5-Unofficial:5.09.49.60:dev' api 'com.github.GTNewHorizons:Baubles:1.0.4:dev' - api 'com.github.GTNewHorizons:ModularUI:1.2.0:dev' - api ('com.github.GTNewHorizons:ThaumicBoots:1.3.7:dev'){ + api 'com.github.GTNewHorizons:ModularUI:1.2.1:dev' + api ('com.github.GTNewHorizons:ThaumicBoots:1.3.8:dev'){ exclude group: 'com.github.GTNewHorizons', module: 'Electro-Magic-Tools' } diff --git a/settings.gradle b/settings.gradle index 242692e5..3d3ba12c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,7 +17,7 @@ pluginManagement { } plugins { - id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.26' + id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.27' } From c5727205ca6d7850640d87dfc5a08126e60c42ca Mon Sep 17 00:00:00 2001 From: Alexdoru <57050655+Alexdoru@users.noreply.github.com> Date: Fri, 6 Sep 2024 16:18:14 +0200 Subject: [PATCH 4/4] fix boolean logic --- src/main/java/emt/init/EMTRecipes.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/emt/init/EMTRecipes.java b/src/main/java/emt/init/EMTRecipes.java index 4808132b..6a44b5a6 100644 --- a/src/main/java/emt/init/EMTRecipes.java +++ b/src/main/java/emt/init/EMTRecipes.java @@ -1092,9 +1092,9 @@ public static void registerLateRecipes() { /** IC2 Stuff related recipes **/ - final boolean isDreamcraftLoaded = Loader.isModLoaded("dreamcraft"); + final boolean isDreamcraftNotLoaded = !Loader.isModLoaded("dreamcraft"); - if (isDreamcraftLoaded) { + if (isDreamcraftNotLoaded) { /* Ore Clusters Macerator Recipes */ ItemStack ironClusterRecipe = IC2Items.getItem("smallIronDust").copy(); ironClusterRecipe.stackSize = 22; @@ -1158,7 +1158,7 @@ public static void registerLateRecipes() { 'Z', new ItemStack(Blocks.obsidian)); - if (isDreamcraftLoaded) { + if (isDreamcraftNotLoaded) { Recipes.metalformerRolling.addRecipe( new RecipeInputItemStack(new ItemStack(ConfigItems.itemResource, 1, 2)), null,