diff options
| author | Glease <4586901+Glease@users.noreply.github.com> | 2023-04-02 00:02:47 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-01 18:02:47 +0200 |
| commit | 6b77557e0e87cf5afd9ebd3985323ff1249e615c (patch) | |
| tree | 36474042ef39f863aedc007eab81a9b09cc7aa78 /src/main/java/gregtech/loaders | |
| parent | 655cc902d3df19a1ac2bfaa38cc928ed629d0171 (diff) | |
| download | GT5-Unofficial-6b77557e0e87cf5afd9ebd3985323ff1249e615c.tar.gz GT5-Unofficial-6b77557e0e87cf5afd9ebd3985323ff1249e615c.tar.bz2 GT5-Unofficial-6b77557e0e87cf5afd9ebd3985323ff1249e615c.zip | |
Recipe Adder v2 (#1770)
* add everything
* fixes
* migrate plasma forge recipes
* syntax update
* make chances array length differ a fatal error
* time constants + long eut overload
* migrate extruder recipes
* migrate electromagnetic separator recipes
* migrate wiremill recipes
* migrate forming press recipes
* migrate bender recipes
* add doc to clarify the three itemInputs
* migrate alloy smelter recipes
* migrate arc furnace recipes
* added ModIDs enum
* sort ModIDs
* migrate autoclave recipes
* migrated some assembler recipes
* split a bit more assembler recipes
* migrate canner recipes
* migrate brewing recipes
* ic2 mod check in canner recipes
* use some loops to reduce the amount of recipes to migrate
* add requested helper methods
* migrate vacuum freezer recipes
* migrate thermal centrifuge recipes
* format smelter recipes only, doesn't go through normal GT recipe
* migrated slicer recipes
* migrated sifter recipes
* Use proper enum now
* remove more constants
* cleaning cutting recipes before migration
* remove tons of dead commented recipes
* migrate pyrolyse recipes
* use ModIDs enum more
* migrate printer recipes
* add a less confusing way to specify value of specialItem
* migrate pulverizer recipes
* less confusing special item specification
* even more ModIDs enum usage
* fix auto * import confusing Minecraft enum value with Minecraft client object
* migrated blast furnace recipes
* migrated Centrifuge recipes
* migrated assembler recipes
* migrated implosion compressor recipes
* migrated extractor recipes
* migrated mixer recipes
* remove useless code
* mgrate universal chemical recipes
* refactor chemical recipes
* migrate single block only chem reactor recipes
* migrate chem reactor recipes
* reworked circuit assembler recipes before migrating them
* migrated circuit assembler recipes
* fix merge conflict for assembler recipes
* remove leftover of the merge conflicts
* fix weird translation glitch
* example of assembly line recipe using RA2
* bugfixes for assline
* remove specialValue usage in blast furnace recipes
* fix more bugs
* add nooptimize to where it make sense
* add recipe descriptions
* Materials.Superconductor -> Materials.SuperconductorUHV
* remove useless Object creations
* remove explicit long casts
* migrate assemblyline recipes
* migrate chemical bath recipes
* migrate compressor recipes
* move smelting recipe where it belongs
* migrated cutting machine recipes
* migrated fermenter recipes (unhide alcohol)
* remove explicit long casts
* migrate fluid canner recipes
* migrate fluid heater recipes
* migrated fusion recipes
* migrated lathe recipes
* migrated laser engraver recipes
* migrated packager recipes
* migrated forge hammer recipes
* migrated TPM recipes
* exit early and reduced indents
* migrated fluid extractor recipes
* migrated fluid solidifier recipes
* migrated electrolyzer recipes
* migrated crop processing recipes
* migrated default polymerization recipes
* migrate distillery recipes
* migrate matter amplifier recipes
* add metadata identifier for fusion ignition threshold
* migrate fuel recipes
* update bs
(cherry picked from commit c2d931c9b6caa0376e9d50591894cd849021104d)
* spotless
(cherry picked from commit 1060f5357fb95e28bfae1f052025f55dabc21a0f)
* guard against null itemstacks
* wrong translation
* fix empty arrays being accessed
* add 0 duration and 0 EU/t for fuel recipes
* fix typo in matter amplifier recipes
* spotless apply
---------
Co-authored-by: boubou19 <miisterunknown@gmail.com>
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/gregtech/loaders')
65 files changed, 18095 insertions, 21273 deletions
diff --git a/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java b/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java index 58808e2162..e876252137 100644 --- a/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java +++ b/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java @@ -1,25 +1,23 @@ package gregtech.loaders.materialprocessing; -import static gregtech.api.enums.GT_Values.MOD_ID_DC; +import static gregtech.api.enums.ModIDs.*; -import cpw.mods.fml.common.Loader; -import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; public class ProcessingModSupport implements gregtech.api.interfaces.IMaterialHandler { - public static boolean aTGregSupport = Loader.isModLoaded("TGregworks") || Loader.isModLoaded(MOD_ID_DC); - public static boolean aEnableUBCMats = Loader.isModLoaded("UndergroundBiomes") || aTGregSupport; - public static boolean aEnableThaumcraftMats = Loader.isModLoaded("Thaumcraft") || aTGregSupport; - public static boolean aEnableRotaryCraftMats = Loader.isModLoaded("RotaryCraft") || aTGregSupport; - public static boolean aEnableThermalFoundationMats = Loader.isModLoaded("ThermalFoundation") || aTGregSupport; - public static boolean aEnableEnderIOMats = Loader.isModLoaded("EnderIO") || aTGregSupport; - public static boolean aEnableRailcraftMats = Loader.isModLoaded(GT_Values.MOD_ID_RC) || aTGregSupport; - public static boolean aEnableGCMarsMats = Loader.isModLoaded("GalacticraftMars") || aTGregSupport; - public static boolean aEnableTwilightMats = Loader.isModLoaded(GT_Values.MOD_ID_TF) || aTGregSupport; - public static boolean aEnableMetallurgyMats = Loader.isModLoaded("Metallurgy") || aTGregSupport; - public static boolean aEnableProjectRedMats = Loader.isModLoaded("ProjRed|Core") || aTGregSupport; + public static boolean aTGregSupport = TinkersGregworks.isModLoaded() || NewHorizonsCoreMod.isModLoaded(); + public static boolean aEnableUBCMats = UndergroundBiomes.isModLoaded() || aTGregSupport; + public static boolean aEnableThaumcraftMats = Thaumcraft.isModLoaded() || aTGregSupport; + public static boolean aEnableRotaryCraftMats = RotaryCraft.isModLoaded() || aTGregSupport; + public static boolean aEnableThermalFoundationMats = ThermalFondation.isModLoaded() || aTGregSupport; + public static boolean aEnableEnderIOMats = EnderIO.isModLoaded() || aTGregSupport; + public static boolean aEnableRailcraftMats = Railcraft.isModLoaded() || aTGregSupport; + public static boolean aEnableGCMarsMats = GalacticraftMars.isModLoaded() || aTGregSupport; + public static boolean aEnableTwilightMats = TwilightForest.isModLoaded() || aTGregSupport; + public static boolean aEnableMetallurgyMats = Metallurgy.isModLoaded() || aTGregSupport; + public static boolean aEnableProjectRedMats = ProjectRedCore.isModLoaded() || aTGregSupport; public ProcessingModSupport() { Materials.add(this); @@ -140,12 +138,12 @@ public class ProcessingModSupport implements gregtech.api.interfaces.IMaterialHa } // Enable Materials if correct mod is Loaded - Materials.ChromiumDioxide.mHasParentMod = Loader.isModLoaded("computronics"); + Materials.ChromiumDioxide.mHasParentMod = Computronics.isModLoaded(); } @Override public void onComponentInit() { - if (Loader.isModLoaded("computronics")) { + if (Computronics.isModLoaded()) { OrePrefixes.ring.enableComponent(Materials.RedAlloy); OrePrefixes.ring.enableComponent(Materials.NiobiumTitanium); OrePrefixes.foil.enableComponent(Materials.StainlessSteel); diff --git a/src/main/java/gregtech/loaders/misc/GT_Achievements.java b/src/main/java/gregtech/loaders/misc/GT_Achievements.java index 58f56cbd70..59abc0566a 100644 --- a/src/main/java/gregtech/loaders/misc/GT_Achievements.java +++ b/src/main/java/gregtech/loaders/misc/GT_Achievements.java @@ -1,5 +1,7 @@ package gregtech.loaders.misc; +import static gregtech.api.enums.ModIDs.Thaumcraft; + import java.util.concurrent.ConcurrentHashMap; import net.minecraft.entity.player.EntityPlayer; @@ -15,7 +17,6 @@ import net.minecraftforge.fluids.FluidStack; import thaumcraft.api.ThaumcraftApiHelper; import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.PlayerEvent.ItemCraftedEvent; import cpw.mods.fml.common.gameevent.PlayerEvent.ItemSmeltedEvent; @@ -746,7 +747,7 @@ public class GT_Achievements { } else if (data.mMaterial.mMaterial == Materials.Steel) { if (data.mPrefix == OrePrefixes.ingot && stack.stackSize == stack.getMaxStackSize()) { issueAchievement(player, "steel"); - } else if (data.mPrefix == OrePrefixes.nugget && Loader.isModLoaded("Thaumcraft") + } else if (data.mPrefix == OrePrefixes.nugget && Thaumcraft.isModLoaded() && ThaumcraftApiHelper.isResearchComplete(player.getDisplayName(), "GT_IRON_TO_STEEL")) { issueAchievement(player, "steel"); } diff --git a/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java b/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java index b34527e26f..fc5d79572f 100644 --- a/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java +++ b/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java @@ -5,7 +5,7 @@ import static forestry.api.core.EnumHumidity.ARID; import static forestry.api.core.EnumHumidity.DAMP; import static forestry.api.core.EnumTemperature.*; import static forestry.core.genetics.alleles.EnumAllele.*; -import static gregtech.api.enums.GT_Values.MOD_ID_DC; +import static gregtech.api.enums.ModIDs.*; import static gregtech.loaders.misc.GT_BeeDefinitionReference.*; import java.awt.*; @@ -20,7 +20,6 @@ import net.minecraft.item.ItemStack; import org.apache.commons.lang3.text.WordUtils; -import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; import forestry.api.apiculture.*; import forestry.api.core.EnumHumidity; @@ -63,7 +62,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { // organic CLAY(GT_BranchDefinition.ORGANIC, "Clay", true, new Color(0xC8C8DA), new Color(0x0000FF), beeSpecies -> { - beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.30f); + beeSpecies.addProduct(GT_ModHandler.getModItem(Forestry.modID, "beeCombs", 1, 0), 0.30f); beeSpecies.addProduct(new ItemStack(Items.clay_ball, 1), 0.15f); beeSpecies.addSpecialty(GT_ModHandler.getModItem("BiomesOPlenty", "mudball", 1, 0), 0.05f); beeSpecies.setHumidity(DAMP); @@ -78,14 +77,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { tMutation.requireResource(Blocks.clay, 0); // blockStainedHardenedClay }), SLIMEBALL(GT_BranchDefinition.ORGANIC, "SlimeBall", true, new Color(0x4E9E55), new Color(0x00FF15), beeSpecies -> { - beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 15), 0.30f); + beeSpecies.addProduct(GT_ModHandler.getModItem(Forestry.modID, "beeCombs", 1, 15), 0.30f); beeSpecies.addProduct(new ItemStack(Items.slime_ball, 1), 0.15f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.STICKY), 0.05f); beeSpecies.setHumidity(DAMP); beeSpecies.setTemperature(EnumTemperature.NORMAL); - if (Loader.isModLoaded("TConstruct")) { - beeSpecies.addProduct(GT_ModHandler.getModItem("TConstruct", "strangeFood", 1, 0), 0.10f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem("TConstruct", "slime.gel", 1, 2), 0.02f); + if (TinkerConstruct.isModLoaded()) { + beeSpecies.addProduct(GT_ModHandler.getModItem(TinkerConstruct.modID, "strangeFood", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(TinkerConstruct.modID, "slime.gel", 1, 2), 0.02f); } }, template -> { AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.MUSHROOMS); @@ -95,14 +94,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, FLOWER_PROVIDER, getFlowers(EXTRABEES, "water")); }, dis -> { IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(FORESTRY, "Marshy"), CLAY, 7); - if (Loader.isModLoaded("TConstruct")) - tMutation.requireResource(GameRegistry.findBlock("TConstruct", "slime.gel"), 1); + if (TinkerConstruct.isModLoaded()) + tMutation.requireResource(GameRegistry.findBlock(TinkerConstruct.modID, "slime.gel"), 1); }), PEAT(GT_BranchDefinition.ORGANIC, "Peat", true, new Color(0x906237), new Color(0x58300B), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.LIGNIE), 0.30f); - beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.15f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "peat", 1, 0), 0.15f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "mulch", 1, 0), 0.05f); + beeSpecies.addProduct(GT_ModHandler.getModItem(Forestry.modID, "beeCombs", 1, 0), 0.15f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(Forestry.modID, "peat", 1, 0), 0.15f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(Forestry.modID, "mulch", 1, 0), 0.05f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(EnumTemperature.NORMAL); }, template -> { @@ -114,7 +113,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { }, dis -> dis.registerMutation(getSpecies(FORESTRY, "Rural"), CLAY, 10)), STICKYRESIN(GT_BranchDefinition.ORGANIC, "StickyResin", true, new Color(0x2E8F5B), new Color(0xDCC289), beeSpecies -> { - beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.30f); + beeSpecies.addProduct(GT_ModHandler.getModItem(Forestry.modID, "beeCombs", 1, 0), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.STICKY), 0.15f); beeSpecies.addSpecialty(ItemList.IC2_Resin.get(1), 0.15f); beeSpecies.setHumidity(EnumHumidity.NORMAL); @@ -144,7 +143,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { tMutation.requireResource("blockCoal"); }), OIL(GT_BranchDefinition.ORGANIC, "Oil", true, new Color(0x4C4C4C), new Color(0x333333), beeSpecies -> { - beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.30f); + beeSpecies.addProduct(GT_ModHandler.getModItem(Forestry.modID, "beeCombs", 1, 0), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.OIL), 0.75f); beeSpecies.setHumidity(DAMP); beeSpecies.setTemperature(EnumTemperature.NORMAL); @@ -657,7 +656,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { // IC2 COOLANT(GT_BranchDefinition.IC2, "Coolant", false, new Color(0x144F5A), new Color(0x2494A2), beeSpecies -> { - beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 4), 0.30f); + beeSpecies.addProduct(GT_ModHandler.getModItem(Forestry.modID, "beeCombs", 1, 4), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.COOLANT), 0.15f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(COLD); @@ -775,7 +774,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { }), // Alloy REDALLOY(GT_BranchDefinition.GTALLOY, "RedAlloy", false, new Color(0xE60000), new Color(0xB80000), beeSpecies -> { - beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 7), 0.30f); + beeSpecies.addProduct(GT_ModHandler.getModItem(Forestry.modID, "beeCombs", 1, 7), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.REDALLOY), 0.15f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(EnumTemperature.NORMAL); @@ -788,7 +787,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { }), REDSTONEALLOY(GT_BranchDefinition.GTALLOY, "RedStoneAlloy", false, new Color(0xA50808), new Color(0xE80000), beeSpecies -> { - beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 7), 0.30f); + beeSpecies.addProduct(GT_ModHandler.getModItem(Forestry.modID, "beeCombs", 1, 7), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.REDSTONEALLOY), 0.15f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(EnumTemperature.NORMAL); @@ -801,7 +800,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { }), CONDUCTIVEIRON(GT_BranchDefinition.GTALLOY, "ConductiveIron", false, new Color(0xCEADA3), new Color(0x817671), beeSpecies -> { - beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 7), 0.30f); + beeSpecies.addProduct(GT_ModHandler.getModItem(Forestry.modID, "beeCombs", 1, 7), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.CONDUCTIVEIRON), 0.15f); beeSpecies.setHumidity(DAMP); beeSpecies.setTemperature(WARM); @@ -815,7 +814,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { }), ENERGETICALLOY(GT_BranchDefinition.GTALLOY, "EnergeticAlloy", false, new Color(0xFF9933), new Color(0xFFAD5C), beeSpecies -> { - beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 7), 0.30f); + beeSpecies.addProduct(GT_ModHandler.getModItem(Forestry.modID, "beeCombs", 1, 7), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ENERGETICALLOY), 0.15f); beeSpecies.setHumidity(DAMP); beeSpecies.setTemperature(EnumTemperature.NORMAL); @@ -828,7 +827,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { }), VIBRANTALLOY(GT_BranchDefinition.GTALLOY, "VibrantAlloy", false, new Color(0x86A12D), new Color(0xC4F2AE), beeSpecies -> { - beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 7), 0.30f); + beeSpecies.addProduct(GT_ModHandler.getModItem(Forestry.modID, "beeCombs", 1, 7), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.VIBRANTALLOY), 0.15 |
