From bc1f787f58c0ef6fbbb57a3ae8ef7cced446ff6c Mon Sep 17 00:00:00 2001 From: chochem <40274384+chochem@users.noreply.github.com> Date: Tue, 31 Dec 2024 13:20:12 +0100 Subject: [PATCH] First round of EFR recipe integration (#1121) Co-authored-by: Martin Robertz Co-authored-by: Caedis Co-authored-by: Maya <10861407+serenibyss@users.noreply.github.com> --- .../dreammaster/recipes/RecipeRemover.java | 16 +++++ .../com/dreammaster/scripts/ScriptEFR.java | 69 +++++++++++++++++++ .../com/dreammaster/scripts/ScriptLoader.java | 1 + 3 files changed, 86 insertions(+) create mode 100644 src/main/java/com/dreammaster/scripts/ScriptEFR.java diff --git a/src/main/java/com/dreammaster/recipes/RecipeRemover.java b/src/main/java/com/dreammaster/recipes/RecipeRemover.java index c35c4f9c2..61edbd182 100644 --- a/src/main/java/com/dreammaster/recipes/RecipeRemover.java +++ b/src/main/java/com/dreammaster/recipes/RecipeRemover.java @@ -23,6 +23,7 @@ import static gregtech.api.enums.Mods.ElectroMagicTools; import static gregtech.api.enums.Mods.EnderIO; import static gregtech.api.enums.Mods.EnderZoo; +import static gregtech.api.enums.Mods.EtFuturumRequiem; import static gregtech.api.enums.Mods.EternalSingularity; import static gregtech.api.enums.Mods.ExtraBees; import static gregtech.api.enums.Mods.ExtraTrees; @@ -324,6 +325,21 @@ public static void run() { bufferMap = new HashMap<>(); final long timeStart = System.currentTimeMillis(); + if (EtFuturumRequiem.isModLoaded()) { + removeRecipeByOutputDelayed(getModItem(EtFuturumRequiem.ID, "blast_furnace", 1, 0)); + removeRecipeByOutputDelayed(getModItem(EtFuturumRequiem.ID, "wooden_armorstand", 1, 0)); + removeRecipeByOutputDelayed(getModItem(EtFuturumRequiem.ID, "smoker", 1, 0)); + removeRecipeByOutputDelayed(getModItem(EtFuturumRequiem.ID, "end_crystal", 1, 0)); + removeRecipeByOutputDelayed(getModItem(EtFuturumRequiem.ID, "cherry_trapdoor", 1, 0)); + removeRecipeByOutputDelayed(getModItem(EtFuturumRequiem.ID, "smithing_table", 1, 0)); + for (int i = 0; i < 16; i++) { + removeRecipeByOutputDelayed(getModItem(EtFuturumRequiem.ID, "banner", 1, i)); + } + for (int i = 0; i < 9; i++) { + removeRecipeByOutputDelayed(getModItem(EtFuturumRequiem.ID, "shulker_box_upgrade", 1, i)); + } + } + // AUTOGENERATED FROM SCRIPTS GTModHandler.removeFurnaceSmelting(GTOreDictUnificator.get(OrePrefixes.plate, Materials.Sunnarium, 1L)); diff --git a/src/main/java/com/dreammaster/scripts/ScriptEFR.java b/src/main/java/com/dreammaster/scripts/ScriptEFR.java new file mode 100644 index 000000000..0822740a5 --- /dev/null +++ b/src/main/java/com/dreammaster/scripts/ScriptEFR.java @@ -0,0 +1,69 @@ +package com.dreammaster.scripts; + +import static gregtech.api.enums.Mods.EtFuturumRequiem; +import static gregtech.api.enums.Mods.ExtraUtilities; +import static gregtech.api.enums.Mods.Minecraft; +import static gregtech.api.enums.Mods.Thaumcraft; +import static gregtech.api.util.GTModHandler.getModItem; + +import java.util.Arrays; +import java.util.List; + +import com.dreammaster.recipes.CustomItem; + +import gregtech.api.util.GTModHandler; + +public class ScriptEFR implements IScriptLoader { + + @Override + public String getScriptName() { + return "Et Futurum Requiem"; + } + + @Override + public List getDependencies() { + return Arrays.asList(EtFuturumRequiem.ID, ExtraUtilities.ID, Thaumcraft.ID); + } + + @Override + public void loadRecipes() { + long bits = GTModHandler.RecipeBits.NOT_REMOVABLE | GTModHandler.RecipeBits.REVERSIBLE + | GTModHandler.RecipeBits.BUFFERED; + GTModHandler.addCraftingRecipe( + GTModHandler.getModItem(EtFuturumRequiem.ID, "observer", 1L), + bits, + new Object[] { "AEA", "BCD", "AAA", 'A', "cobblestone", 'B', "dustRedstone", 'C', + GTModHandler.getModItem(ExtraUtilities.ID, "budoff", 1, 0), 'D', + GTModHandler.getModItem(Minecraft.ID, "comparator", 1, 0), 'E', "gearGtSmallAnyIron" }); + + GTModHandler.addCraftingRecipe( + GTModHandler.getModItem(EtFuturumRequiem.ID, "cherry_trapdoor", 1L), + bits, + new Object[] { "ABA", "BCB", "ABA", 'A', + GTModHandler.getModItem(EtFuturumRequiem.ID, "wood_slab", 1L, 3), 'B', "stickWood", 'C', + "itemFlint" }); + + GTModHandler.addCraftingRecipe( + GTModHandler.getModItem(EtFuturumRequiem.ID, "cherry_trapdoor", 2L), + bits, + new Object[] { "ABA", "BCB", "ABA", 'A', + GTModHandler.getModItem(EtFuturumRequiem.ID, "wood_slab", 1L, 3), 'B', "stickWood", 'C', + "screwIron" }); + + GTModHandler.addCraftingRecipe( + GTModHandler.getModItem(EtFuturumRequiem.ID, "cherry_trapdoor", 3L), + bits, + new Object[] { "ABA", "BCB", "ABA", 'A', + GTModHandler.getModItem(EtFuturumRequiem.ID, "wood_slab", 1L, 3), 'B', "stickWood", 'C', + "screwSteel" }); + for (int i = 0; i < 16; i++) { + addShapelessRecipe( + GTModHandler.getModItem(EtFuturumRequiem.ID, "banner", 1L, i), + new CustomItem.NBTItem(getModItem(Thaumcraft.ID, "blockWoodenDevice", 1, 8)) + .setNBT("{color:" + i + "b}")); + addShapelessRecipe( + createItemStack(Thaumcraft.ID, "blockWoodenDevice", 1, 8, "{color:" + i + "b}", missing), + GTModHandler.getModItem(EtFuturumRequiem.ID, "banner", 1L, i)); + } + } +} diff --git a/src/main/java/com/dreammaster/scripts/ScriptLoader.java b/src/main/java/com/dreammaster/scripts/ScriptLoader.java index 9f09d2e24..18441b9e9 100644 --- a/src/main/java/com/dreammaster/scripts/ScriptLoader.java +++ b/src/main/java/com/dreammaster/scripts/ScriptLoader.java @@ -52,6 +52,7 @@ public static void run() { new ScriptComputronics(), new ScriptCoreMod(), new ScriptDraconicEvolution(), + new ScriptEFR(), new ScriptEMT(), new ScriptEnderIO(), new ScriptEnderZoo(),