diff options
Diffstat (limited to 'src/main/java/gtPlusPlus/core/handler')
4 files changed, 85 insertions, 203 deletions
diff --git a/src/main/java/gtPlusPlus/core/handler/COMPAT_HANDLER.java b/src/main/java/gtPlusPlus/core/handler/COMPAT_HANDLER.java index 27816d2a42..5e78c2ed2d 100644 --- a/src/main/java/gtPlusPlus/core/handler/COMPAT_HANDLER.java +++ b/src/main/java/gtPlusPlus/core/handler/COMPAT_HANDLER.java @@ -1,7 +1,5 @@ package gtPlusPlus.core.handler; -import static gtPlusPlus.core.lib.LoadedMods.Gregtech; - import java.util.LinkedList; import java.util.Queue; import java.util.Set; @@ -35,7 +33,6 @@ import gtPlusPlus.core.item.ModItems; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.MaterialGenerator; -import gtPlusPlus.core.recipe.RECIPES_Extruder; import gtPlusPlus.core.recipe.RECIPES_GREGTECH; import gtPlusPlus.core.recipe.RECIPES_LaserEngraver; import gtPlusPlus.core.recipe.ShapedRecipeObject; @@ -73,98 +70,90 @@ public class COMPAT_HANDLER { } public static void registerGregtechMachines() { - if (Gregtech) { - - // Debug - GregtechItemList.Garbage_Collector_Debug_Machine.set( - new GregtechMetaGarbageCollector( - "garbagecollector.01.tier.single", - "JVM Garbage Collector", - "Useful for debugging or smoother performance on local servers").getStackForm(1L)); - - // Free IDs - /* - * --- 859 to 868 --- 911 to 940 - */ + // Debug + GregtechItemList.Garbage_Collector_Debug_Machine.set( + new GregtechMetaGarbageCollector( + "garbagecollector.01.tier.single", + "JVM Garbage Collector", + "Useful for debugging or smoother performance on local servers").getStackForm(1L)); - new RECIPES_LaserEngraver(); - new RECIPES_Extruder(); - GregtechGeneratorsULV.run(); - GregtechEnergyBuffer.run(); - GregtechLFTR.run(); - GregtechSteamCondenser.run(); - GregtechSafeBlock.run(); - // GregtechSuperConductionPoint.run(); - GregtechIronBlastFurnace.run(); - GregtechIndustrialCentrifuge.run(); - GregtechIndustrialCokeOven.run(); - GregtechIndustrialPlatePress.run(); - GregtechRocketFuelGenerator.run(); - GregtechIndustrialElectrolyzer.run(); - GregtechIndustrialMacerator.run(); - GregtechIndustrialWiremill.run(); - GregtechIndustrialMassFabricator.run(); - GregtechIndustrialBlastSmelter.run(); - GregtechQuantumForceTransformer.run(); - GregtechSolarGenerators.run(); - GregtechPowerSubStation.run(); - GregtechDehydrator.run(); - GregtechAdvancedBoilers.run(); - GregtechPollutionDevices.run(); - GregtechTieredFluidTanks.run(); - // GregtechIndustrialMultiTank.run(); - GregtechGeothermalThermalGenerator.run(); - Gregtech4Content.run(); - GregtechIndustrialFuelRefinery.run(); - GregtechTreeFarmerTE.run(); - GregtechIndustrialTreeFarm.run(); - GregtechIndustrialSifter.run(); - GregtechSimpleWasher.run(); - GregtechRTG.run(); - GregtechCyclotron.run(); - GregtechHiAmpTransformer.run(); - GregtechIndustrialThermalCentrifuge.run(); - GregtechIndustrialWashPlant.run(); - GregtechSemiFluidgenerators.run(); - GregtechWirelessChargers.run(); - GregtechIndustrialGeneratorArray.run(); - GregtechIndustrialCuttingFactory.run(); - // GregtechMiniRaFusion.run(); - GregtechComponentAssembler.run(); - GregtechTeslaTower.run(); - GregtechSuperChests.run(); - GregtechIndustrialFishPond.run(); - GregtechTieredChunkloaders.run(); - GregtechIndustrialExtruder.run(); - GregtechIndustrialMultiMachine.run(); - // GregtechBedrockPlatforms.run(); - GregtechBufferDynamos.run(); - GregtechAmazonWarehouse.run(); - GregtechFactoryGradeReplacementMultis.run(); - GregtechThaumcraftDevices.run(); - GregtechThreadedBuffers.run(); - GregtechIndustrialMixer.run(); - GregtechCustomHatches.run(); - // GregtechNaqReactor.run(); - GregtechIndustrialArcFurnace.run(); - GregtechSolarTower.run(); - GregtechLargeTurbinesAndHeatExchanger.run(); - GregtechPowerBreakers.run(); - GregtechFluidReactor.run(); - GregtechAlgaeContent.run(); - GregtechIndustrialAlloySmelter.run(); - GregtechIsaMill.run(); - GregtechSteamMultis.run(); - GregtechIndustrialForgeHammer.run(); - GregtechMolecularTransformer.run(); - GregtechIndustrialElementDuplicator.run(); - GregtechIndustrialRockBreaker.run(); - GregtechIndustrialChisel.run(); - GregtechIndustrialFluidHeater.run(); + // Free IDs + /* + * --- 859 to 868 --- 911 to 940 + */ - // New Horizons Content - NewHorizonsAccelerator.run(); - } + new RECIPES_LaserEngraver(); + GregtechGeneratorsULV.run(); + GregtechEnergyBuffer.run(); + GregtechLFTR.run(); + GregtechSteamCondenser.run(); + GregtechSafeBlock.run(); + GregtechIronBlastFurnace.run(); + GregtechIndustrialCentrifuge.run(); + GregtechIndustrialCokeOven.run(); + GregtechIndustrialPlatePress.run(); + GregtechRocketFuelGenerator.run(); + GregtechIndustrialElectrolyzer.run(); + GregtechIndustrialMacerator.run(); + GregtechIndustrialWiremill.run(); + GregtechIndustrialMassFabricator.run(); + GregtechIndustrialBlastSmelter.run(); + GregtechQuantumForceTransformer.run(); + GregtechSolarGenerators.run(); + GregtechPowerSubStation.run(); + GregtechDehydrator.run(); + GregtechAdvancedBoilers.run(); + GregtechPollutionDevices.run(); + GregtechTieredFluidTanks.run(); + // GregtechIndustrialMultiTank.run(); + GregtechGeothermalThermalGenerator.run(); + Gregtech4Content.run(); + GregtechIndustrialFuelRefinery.run(); + GregtechTreeFarmerTE.run(); + GregtechIndustrialTreeFarm.run(); + GregtechIndustrialSifter.run(); + GregtechSimpleWasher.run(); + GregtechRTG.run(); + GregtechCyclotron.run(); + GregtechHiAmpTransformer.run(); + GregtechIndustrialThermalCentrifuge.run(); + GregtechIndustrialWashPlant.run(); + GregtechSemiFluidgenerators.run(); + GregtechWirelessChargers.run(); + GregtechIndustrialGeneratorArray.run(); + GregtechIndustrialCuttingFactory.run(); + // GregtechMiniRaFusion.run(); + GregtechComponentAssembler.run(); + GregtechTeslaTower.run(); + GregtechSuperChests.run(); + GregtechIndustrialFishPond.run(); + GregtechTieredChunkloaders.run(); + GregtechIndustrialExtruder.run(); + GregtechIndustrialMultiMachine.run(); + // GregtechBedrockPlatforms.run(); + GregtechBufferDynamos.run(); + GregtechAmazonWarehouse.run(); + GregtechFactoryGradeReplacementMultis.run(); + GregtechThaumcraftDevices.run(); + GregtechThreadedBuffers.run(); + GregtechIndustrialMixer.run(); + GregtechCustomHatches.run(); + // GregtechNaqReactor.run(); + GregtechIndustrialArcFurnace.run(); + GregtechSolarTower.run(); + GregtechLargeTurbinesAndHeatExchanger.run(); + GregtechPowerBreakers.run(); + GregtechFluidReactor.run(); + GregtechAlgaeContent.run(); + GregtechIndustrialAlloySmelter.run(); + GregtechIsaMill.run(); + GregtechSteamMultis.run(); + GregtechIndustrialForgeHammer.run(); + GregtechMolecularTransformer.run(); + GregtechIndustrialElementDuplicator.run(); + GregtechIndustrialRockBreaker.run(); + GregtechIndustrialChisel.run(); + GregtechIndustrialFluidHeater.run(); } // InterMod @@ -203,9 +192,7 @@ public class COMPAT_HANDLER { if (LoadedMods.CompactWindmills) { COMPAT_CompactWindmills.OreDict(); } - if (LoadedMods.IndustrialCraft2) { - COMPAT_IC2.OreDict(); - } + COMPAT_IC2.OreDict(); if (LoadedMods.PamsHarvestcraft) { COMPAT_HarvestCraft.OreDict(); } diff --git a/src/main/java/gtPlusPlus/core/handler/EnumHelperHandler.java b/src/main/java/gtPlusPlus/core/handler/EnumHelperHandler.java index c22cb3bc56..746b2bb814 100644 --- a/src/main/java/gtPlusPlus/core/handler/EnumHelperHandler.java +++ b/src/main/java/gtPlusPlus/core/handler/EnumHelperHandler.java @@ -1,19 +1,12 @@ package gtPlusPlus.core.handler; -import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.xmod.gregtech.HANDLER_GT; import gtPlusPlus.xmod.ic2.CustomInternalName; public class EnumHelperHandler { public static void init() { - - if (LoadedMods.IndustrialCraft2) { - CustomInternalName.init(); - } - - if (LoadedMods.Gregtech) { - HANDLER_GT.addNewOrePrefixes(); - } + CustomInternalName.init(); + HANDLER_GT.addNewOrePrefixes(); } } diff --git a/src/main/java/gtPlusPlus/core/handler/OldCircuitHandler.java b/src/main/java/gtPlusPlus/core/handler/OldCircuitHandler.java deleted file mode 100644 index 4881479be3..0000000000 --- a/src/main/java/gtPlusPlus/core/handler/OldCircuitHandler.java +++ /dev/null @@ -1,97 +0,0 @@ -package gtPlusPlus.core.handler; - -import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableOldGTcircuits; - -import java.lang.reflect.Field; -import java.util.HashSet; - -import org.apache.commons.lang3.reflect.FieldUtils; - -import gregtech.api.enums.GT_Values; -import gregtech.api.util.EmptyRecipeMap; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.RECIPES_Old_Circuits; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechItems; - -public class OldCircuitHandler { - - public static void preInit() { - if (enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH) { - removeCircuitRecipeMap(); // Bye shitty recipes. - } - } - - public static void init() {} - - public static void postInit() { - if (enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH) { - RECIPES_Old_Circuits.handleCircuits(); - new RECIPES_Old_Circuits(); - } - } - - public static boolean addCircuitItems() { - if (enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH) { - return MetaGeneratedGregtechItems.INSTANCE.registerOldCircuits(); - } - return false; - } - - private static boolean removeCircuitRecipeMap() { - if (enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH) { - try { - Logger.INFO( - "[Old Feature - Circuits] Trying to override the Circuit Assembler Recipe map, so that no recipes for new circuits get added."); - ReflectionUtils.setFinalStatic( - GT_Recipe_Map.class.getDeclaredField("sCircuitAssemblerRecipes"), - new EmptyRecipeMap( - new HashSet<GT_Recipe>(0), - "gt.recipe.removed", - "Removed", - null, - GT_Values.RES_PATH_GUI + "basicmachines/Default", - 0, - 0, - 0, - 0, - 0, - GT_Values.E, - 0, - GT_Values.E, - true, - false)); - Field jaffar = GT_Recipe_Map.class.getDeclaredField("sCircuitAssemblerRecipes"); - FieldUtils.removeFinalModifier(jaffar, true); - jaffar.set( - null, - new EmptyRecipeMap( - new HashSet<GT_Recipe>(0), - "gt.recipe.removed", - "Removed", - null, - GT_Values.RES_PATH_GUI + "basicmachines/Default", - 0, - 0, - 0, - 0, - 0, - GT_Values.E, - 0, - GT_Values.E, - true, - false)); - Logger.INFO( - "[Old Feature - Circuits] Successfully replaced circuit assembler recipe map with one that cannot hold recipes."); - } catch (Exception e) { - Logger.INFO("[Old Feature - Circuits] Failed removing circuit assembler recipe map."); - return false; - } - return true; - } - return false; - } -} diff --git a/src/main/java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java b/src/main/java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java index f240656dd7..cd4ff542dc 100644 --- a/src/main/java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java +++ b/src/main/java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java @@ -17,7 +17,6 @@ public class RegistrationHandler { RECIPES_Tools.loadRecipes(); RECIPES_General.loadRecipes(); RECIPES_Machines.loadRecipes(); - RECIPES_Shapeless.loadRecipes(); RECIPES_MachineComponents.loadRecipes(); RECIPE_Batteries.loadRecipes(); Logger.INFO("Loaded: " + recipesSuccess + " Failed: " + recipesFailed); |