diff options
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.15f); beeSpecies.setHumidity(DAMP); beeSpecies.setTemperature(EnumTemperature.NORMAL); @@ -845,7 +844,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { }), ELECTRICALSTEEL(GT_BranchDefinition.GTALLOY, "ElectricalSteel", false, new Color(0x787878), new Color(0xD8D8D8), 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.ELECTRICALSTEEL), 0.15f); beeSpecies.setHumidity(DAMP); beeSpecies.setTemperature(EnumTemperature.NORMAL); @@ -857,7 +856,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { tMutation.requireResource("blockElectricalSteel"); }), DARKSTEEL(GT_BranchDefinition.GTALLOY, "DarkSteel", false, new Color(0x252525), new Color(0x443B44), 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.DARKSTEEL), 0.15f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(COLD); @@ -870,7 +869,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { }), PULSATINGIRON(GT_BranchDefinition.GTALLOY, "PulsatingIron", false, new Color(0x6DD284), new Color(0x006600), 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.PULSATINGIRON), 0.15f); beeSpecies.setHumidity(DAMP); beeSpecies.setTemperature(EnumTemperature.NORMAL); @@ -923,14 +922,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); }, dis -> { IBeeMutationCustom tMutation = dis.registerMutation(Explosive, DIAMOND, 2); - if (Loader.isModLoaded("ExtraUtilities")) - tMutation.requireResource(GameRegistry.findBlock("ExtraUtilities", "block_bedrockium"), 0); + if (ExtraUtilities.isModLoaded()) + tMutation.requireResource(GameRegistry.findBlock(ExtraUtilities.modID, "block_bedrockium"), 0); }), // thaumic THAUMIUMDUST(GT_BranchDefinition.THAUMIC, "ThaumiumDust", true, new Color(0x7A007A), new Color(0x5C005C), beeSpecies -> { - beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 3), 0.30f); + beeSpecies.addProduct(GT_ModHandler.getModItem(Forestry.modID, "beeCombs", 1, 3), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.THAUMIUMDUST), 0.20f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(EnumTemperature.NORMAL); @@ -968,7 +967,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { // forest }), AMBER(GT_BranchDefinition.THAUMIC, "Amber", true, new Color(0xEE7700), new Color(0x774B15), beeSpecies -> { - beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 3), 0.30f); + beeSpecies.addProduct(GT_ModHandler.getModItem(Forestry.modID, "beeCombs", 1, 3), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.AMBER), 0.20f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(EnumTemperature.NORMAL); @@ -983,7 +982,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { }), QUICKSILVER(GT_BranchDefinition.THAUMIC, "Quicksilver", true, new Color(0x7A007A), new Color(0x5C005C), beeSpecies -> { - beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 3), 0.30f); + beeSpecies.addProduct(GT_ModHandler.getModItem(Forestry.modID, "beeCombs", 1, 3), 0.30f); |
