From 296623cc1fb81ae8e33eb90e8267f09042680abd Mon Sep 17 00:00:00 2001 From: GDCloud Date: Sun, 24 Mar 2024 02:09:57 +0100 Subject: [PATCH] prevent godforge load --- .../loader/recipe/BaseRecipeLoader.java | 3 +- .../tectech/loader/thing/MachineLoader.java | 35 +++++++++++-------- .../tectech/loader/thing/ThingsLoader.java | 13 ++++--- 3 files changed, 31 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/github/technus/tectech/loader/recipe/BaseRecipeLoader.java b/src/main/java/com/github/technus/tectech/loader/recipe/BaseRecipeLoader.java index e9df999e8..3c75b3846 100644 --- a/src/main/java/com/github/technus/tectech/loader/recipe/BaseRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/recipe/BaseRecipeLoader.java @@ -34,7 +34,6 @@ public static Materials getOrDefault(String name, Materials def) { } public void run() { - new Godforge().run(); // todo: Move those recipes in NHCore if (NewHorizonsCoreMod.isModLoaded()) { new Assembler().run(); @@ -43,6 +42,8 @@ public void run() { new Crafting().run(); new Extractor().run(); new ResearchStationAssemblyLine().run(); + } else { + new Godforge().run(); } } } diff --git a/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java b/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java index 564c59608..ee4f8dbfd 100644 --- a/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java @@ -296,6 +296,7 @@ import static com.github.technus.tectech.thing.CustomItemList.holder_Hatch; import static com.github.technus.tectech.thing.CustomItemList.rack_Hatch; import static com.github.technus.tectech.util.CommonValues.V; +import static gregtech.api.enums.Mods.NewHorizonsCoreMod; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; @@ -2035,21 +2036,25 @@ public void run() { Machine_Multi_EyeOfHarmony.set( new GT_MetaTileEntity_EM_EyeOfHarmony(15410, "multimachine.em.eye_of_harmony", "Eye of Harmony") .getStackForm(1L)); - Machine_Multi_ForgeOfGods.set( - new GT_MetaTileEntity_EM_ForgeOfGods(15411, "multimachine.em.forge_of_gods", "Forge of the Gods") - .getStackForm(1L)); - Machine_Multi_SmeltingModule.set( - new GT_MetaTileEntity_EM_SmeltingModule(15412, "multimachine.em.smelting_module", "Smelting Module") - .getStackForm(1L)); - Machine_Multi_MoltenModule.set( - new GT_MetaTileEntity_EM_MoltenModule(15413, "multimachine.em.molten_module", "Molten Module") - .getStackForm(1L)); - Machine_Multi_PlasmaModule.set( - new GT_MetaTileEntity_EM_PlasmaModule(15414, "multimachine.em.plasma_module", "Plasma Module") - .getStackForm(1L)); - Machine_Multi_QuarkGluonPlasmaModule.set( - new GT_MetaTileEntity_EM_ExoticModule(15415, "multimachine.em.exotic_module", "Exotic Matter Module") - .getStackForm(1L)); + if (!NewHorizonsCoreMod.isModLoaded()) { + Machine_Multi_ForgeOfGods.set( + new GT_MetaTileEntity_EM_ForgeOfGods(15411, "multimachine.em.forge_of_gods", "Forge of the Gods") + .getStackForm(1L)); + Machine_Multi_SmeltingModule.set( + new GT_MetaTileEntity_EM_SmeltingModule(15412, "multimachine.em.smelting_module", "Smelting Module") + .getStackForm(1L)); + Machine_Multi_MoltenModule.set( + new GT_MetaTileEntity_EM_MoltenModule(15413, "multimachine.em.molten_module", "Molten Module") + .getStackForm(1L)); + Machine_Multi_PlasmaModule.set( + new GT_MetaTileEntity_EM_PlasmaModule(15414, "multimachine.em.plasma_module", "Plasma Module") + .getStackForm(1L)); + Machine_Multi_QuarkGluonPlasmaModule.set( + new GT_MetaTileEntity_EM_ExoticModule( + 15415, + "multimachine.em.exotic_module", + "Exotic Matter Module").getStackForm(1L)); + } // =================================================================================================== // Hatches diff --git a/src/main/java/com/github/technus/tectech/loader/thing/ThingsLoader.java b/src/main/java/com/github/technus/tectech/loader/thing/ThingsLoader.java index eaec6574e..11e441508 100644 --- a/src/main/java/com/github/technus/tectech/loader/thing/ThingsLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/thing/ThingsLoader.java @@ -2,6 +2,7 @@ import static com.github.technus.tectech.Reference.MODID; import static com.github.technus.tectech.TecTech.tectechTexturePage1; +import static gregtech.api.enums.Mods.NewHorizonsCoreMod; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.thing.block.GodforgeGlassBlock; @@ -64,11 +65,15 @@ public void run() { TT_Container_Casings.StabilisationFieldGenerators = new StabilisationFieldCasing(); - TT_Container_Casings.GodforgeCasings = new GodforgeCasings(); - TecTech.LOGGER.info("Godforge blocks registered."); + if (!NewHorizonsCoreMod.isModLoaded()) { - GodforgeGlassBlock.run(); - TecTech.LOGGER.info("Godforge Glass registered"); + TT_Container_Casings.GodforgeCasings = new GodforgeCasings(); + TecTech.LOGGER.info("Godforge blocks registered."); + + GodforgeGlassBlock.run(); + TecTech.LOGGER.info("Godforge Glass registered"); + + } QuantumGlassBlock.run(); TecTech.LOGGER.info("Quantum Glass registered");