Added IC2 Classic and GregTech6 recipes

This commit is contained in:
Unknown 2018-01-07 19:37:37 +01:00
parent f0909c5b4a
commit 7f8a2750f7
2 changed files with 149 additions and 42 deletions

View file

@ -556,8 +556,10 @@ public class Recipes {
}
// Add Reinforced iridium plate to ore registry as applicable (it's missing in IC2 without GregTech)
if (WarpDriveConfig.isIndustrialCraft2Loaded && (!OreDictionary.doesOreNameExist("plateAlloyIridium") || OreDictionary.getOres("plateAlloyIridium").isEmpty())) {
ItemStack iridiumAlloy = WarpDriveConfig.getModItemStack("IC2", "itemPartIridium", 0);
if ( WarpDriveConfig.isIndustrialCraft2Loaded
&& (!OreDictionary.doesOreNameExist("plateAlloyIridium") || OreDictionary.getOres("plateAlloyIridium").isEmpty()) ) {
ItemStack iridiumAlloy = WarpDriveConfig.getModItemStack("IC2", "itemPartIridium", 0, // IC2 Experimental Iridium alloy plate
"IC2", "item.itemPartIridium", 0); // IC2 Classic Iridium alloy plate
OreDictionary.registerOre("plateAlloyIridium", iridiumAlloy);
}
@ -571,7 +573,18 @@ public class Recipes {
ItemStack itemStackMotorHV = ItemComponent.getItemStack(EnumComponentType.MOTOR);
ItemStack itemStackMotorEV = ItemComponent.getItemStack(EnumComponentType.MOTOR);
if (WarpDriveConfig.isGregTech5Loaded) {
if (WarpDriveConfig.isGregTech6Loaded) {
itemStackMachineCasingLV = WarpDriveConfig.getModItemStack("gregtech", "gt.meta.machine", 8651); // ore:casingMachineSteelGalvanized
itemStackMachineCasingMV = WarpDriveConfig.getModItemStack("gregtech", "gt.meta.machine", 130); // ore:casingMachineAluminium
itemStackMachineCasingHV = WarpDriveConfig.getModItemStack("gregtech", "gt.meta.machine", 8636); // ore:casingMachineStainlessSteel
itemStackMachineCasingEV = WarpDriveConfig.getModItemStack("gregtech", "gt.meta.machine", 240); // ore:casingMachineChromium
itemStackMotorLV = WarpDriveConfig.getModItemStack("gregtech", "gt.multiitem.technological", 12001); // LV Motor
itemStackMotorMV = WarpDriveConfig.getModItemStack("gregtech", "gt.multiitem.technological", 12002); // MV Motor
itemStackMotorHV = WarpDriveConfig.getModItemStack("gregtech", "gt.multiitem.technological", 12003); // HV Motor
itemStackMotorEV = WarpDriveConfig.getModItemStack("gregtech", "gt.multiitem.technological", 12004); // EV Motor
} else if (WarpDriveConfig.isGregTech5Loaded) {
itemStackMachineCasingLV = WarpDriveConfig.getModItemStack("gregtech", "gt.blockcasings", 1);
itemStackMachineCasingMV = WarpDriveConfig.getModItemStack("gregtech", "gt.blockcasings", 2);
itemStackMachineCasingHV = WarpDriveConfig.getModItemStack("gregtech", "gt.blockcasings", 3);
@ -588,13 +601,14 @@ public class Recipes {
itemStackMachineCasingHV = new ItemStack(WarpDrive.blockHighlyAdvancedMachine);
itemStackMachineCasingEV = new ItemStack(WarpDrive.blockHighlyAdvancedMachine);
itemStackMotorHV = WarpDriveConfig.getModItemStack("IC2", "itemRecipePart", 1); // Electric motor
itemStackMotorEV = WarpDriveConfig.getModItemStack("IC2", "itemRecipePart", 1);
ItemStack itemStackMotor = WarpDriveConfig.getModItemStack("IC2", "itemRecipePart", 1, // IC2 Experimental Electric motor
"IC2", "item.itemToolDrill", 0); // IC2 Classic Mining drill
itemStackMotorHV = itemStackMotor;
itemStackMotorEV = itemStackMotor;
ItemStack iridiumAlloy = WarpDriveConfig.getModItemStack("IC2", "itemPartIridium", 0);
GameRegistry.addRecipe(new ItemStack(WarpDrive.blockHighlyAdvancedMachine), "iii", "imi", "iii",
'i', iridiumAlloy,
'm', itemStackMachineCasingMV);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockHighlyAdvancedMachine), false, "iii", "imi", "iii",
'i', "plateAlloyIridium",
'm', itemStackMachineCasingMV));
} else if (WarpDriveConfig.isThermalExpansionLoaded) {
itemStackMachineCasingLV = WarpDriveConfig.getModItemStack("ThermalExpansion", "Frame", 0);
@ -897,7 +911,8 @@ public class Recipes {
if (WarpDriveConfig.isThermalExpansionLoaded) {
oreCoolant = "dustCryotheum";
} else if (WarpDriveConfig.isIndustrialCraft2Loaded) {
oreCoolant = WarpDriveConfig.getModItemStack("IC2", "reactorCoolantSimple", 1); // 10k Coolant Cell
oreCoolant = WarpDriveConfig.getModItemStack("IC2", "reactorCoolantSimple", 1, // IC2 Experimental 10k Coolant Cell
"IC2", "item.reactorCoolantSimple", 0); // IC2 Classic 10k Coolant Cell
}
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.getItemStack(EnumComponentType.SUPERCONDUCTOR), false, "pcp", "cec", "pcp",
'p', ItemComponent.getItemStack(EnumComponentType.POWER_INTERFACE),
@ -1071,8 +1086,10 @@ public class Recipes {
// Air generator is 1 power interface, 4 activated carbon, 1 motor, 1 MV Machine casing, 2 tanks
ItemStack itemStackCompressorOrTank = ItemComponent.getItemStack(EnumComponentType.GLASS_TANK);
if (WarpDriveConfig.isGregTech5Loaded) {
itemStackCompressorOrTank = WarpDriveConfig.getModItemStack("gregtech", "gt.metaitem.02", 21300); // Bronze rotor
if (WarpDriveConfig.isGregTech6Loaded) {
itemStackCompressorOrTank = WarpDriveConfig.getModItemStack("gregtech", "gt.meta.rotor", 8610); // GT6 Bronze rotor, ore:rotorBronze
} else if (WarpDriveConfig.isGregTech5Loaded) {
itemStackCompressorOrTank = WarpDriveConfig.getModItemStack("gregtech", "gt.metaitem.02", 21300); // GT5 Bronze rotor
} else if (WarpDriveConfig.isIndustrialCraft2Loaded) {
itemStackCompressorOrTank = WarpDriveConfig.getModItemStack("IC2", "blockMachine", 5); // Compressor
} else if (WarpDriveConfig.isThermalExpansionLoaded) {
@ -1131,10 +1148,10 @@ public class Recipes {
// Mining laser is 2 motors, 1 diffraction grating, 1 lens, 1 computer interface, 1 MV Machine casing, 1 diamond pick, 2 glass pane
ItemStack itemStackDiamondPick = new ItemStack(Items.diamond_pickaxe);
if (WarpDriveConfig.isGregTech5Loaded) {
itemStackDiamondPick = WarpDriveConfig.getModItemStack("IC2", "itemToolMiningLaser", 1); // Mining laser
// } else if (WarpDriveConfig.isIndustrialCraft2Loaded) {
// itemStackDiamondPick = WarpDriveConfig.getModItemStack("IC2", "blockMachine2", 11); // Advanced Miner
if ( WarpDriveConfig.isGregTech6Loaded
|| WarpDriveConfig.isGregTech5Loaded ) {
itemStackDiamondPick = WarpDriveConfig.getModItemStack("IC2", "itemToolMiningLaser", 1, // IC2 Experimental Mining laser
"IC2", "item.itemToolMiningLaser", 0); // IC2 Classic Mining laser
}
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockMiningLaser), false, "cmr", "tdt", "glg",
't', itemStackMotors[1],
@ -1154,7 +1171,9 @@ public class Recipes {
// Laser lift is ...
Object oreMagnetizer = itemStackMachineCasings[0];
if (WarpDriveConfig.isGregTech5Loaded) {
if (WarpDriveConfig.isGregTech6Loaded) {
oreMagnetizer = WarpDriveConfig.getModItemStack("gregtech", "gt.multitileentity", 20221); // Basic polarizer
} else if (WarpDriveConfig.isGregTech5Loaded) {
oreMagnetizer = WarpDriveConfig.getModItemStack("gregtech", "gt.blockmachines", 551); // Basic polarizer
} else if (WarpDriveConfig.isIndustrialCraft2Loaded) {
oreMagnetizer = WarpDriveConfig.getModItemStack("IC2", "blockMachine", 9);
@ -1173,16 +1192,22 @@ public class Recipes {
'g', "paneGlassColorless"));
// Iridium block is just that
if (WarpDriveConfig.isGregTech5Loaded) {
if (WarpDriveConfig.isGregTech6Loaded) {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockIridium), "iii", "iii", "iii",
'i', "xxx"));
ItemStack itemStackIridiumAlloy = WarpDriveConfig.getModItemStack("gregtech", "gt.meta.plate", 770); // ore:plateIridium
GameRegistry.addShapelessRecipe(new ItemStack(itemStackIridiumAlloy.getItem(), 9), new ItemStack(WarpDrive.blockIridium));
} else if (WarpDriveConfig.isGregTech5Loaded) {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockIridium), "iii", "iii", "iii",
'i', "plateAlloyIridium"));
ItemStack itemStackIridiumAlloy = WarpDriveConfig.getModItemStack("IC2", "itemPartIridium", 0);
ItemStack itemStackIridiumAlloy = WarpDriveConfig.getOreDictionaryEntry("plateAlloyIridium");
GameRegistry.addShapelessRecipe(new ItemStack(itemStackIridiumAlloy.getItem(), 9), new ItemStack(WarpDrive.blockIridium));
} else if (WarpDriveConfig.isIndustrialCraft2Loaded) {
ItemStack itemStackIridiumAlloy = WarpDriveConfig.getModItemStack("IC2", "itemPartIridium", 0);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockIridium), "iii", "iii", "iii",
'i', itemStackIridiumAlloy));
'i', "plateAlloyIridium"));
ItemStack itemStackIridiumAlloy = WarpDriveConfig.getOreDictionaryEntry("plateAlloyIridium");
GameRegistry.addShapelessRecipe(new ItemStack(itemStackIridiumAlloy.getItem(), 9), new ItemStack(WarpDrive.blockIridium));
} else if (WarpDriveConfig.isThermalExpansionLoaded) {
@ -1277,15 +1302,18 @@ public class Recipes {
't', WarpDriveConfig.getModItemStack("IC2", "blockMachine2", 0) )); // Teleporter
/**/
// IC2 needs to loaded for the following 2 recipes
// IC2 needs to be loaded for the following 2 recipes
if (WarpDriveConfig.isIndustrialCraft2Loaded) {
ItemStack itemStackOverclockedHeatVent = WarpDriveConfig.getModItemStack("IC2", "reactorVentGold", 1);
ItemStack itemStackReactorCoolant1 = WarpDriveConfig.getModItemStack("IC2", "reactorCoolantSix", 1);
ItemStack itemStackReactorCoolant2 = itemStackReactorCoolant1;
if (WarpDriveConfig.isGregTech5Loaded) {
itemStackReactorCoolant1 = WarpDriveConfig.getModItemStack("gregtech", "gt.360k_Helium_Coolantcell", 1);
itemStackReactorCoolant2 = WarpDriveConfig.getModItemStack("gregtech", "gt.360k_NaK_Coolantcell", 1);
}
ItemStack itemStackOverclockedHeatVent = WarpDriveConfig.getModItemStack("IC2", "reactorVentGold", 1, // IC2 Experimental Overclocked heat vent
"IC2", "item.reactorVentGold", 0); // IC2 Classic Overclocked heat vent
// (there's no coolant in GT6 as of 6.06.05, so we're falling back to IC2)
ItemStack itemStackReactorCoolant1 = WarpDriveConfig.getModItemStack("gregtech", "gt.360k_Helium_Coolantcell", 1, // GT5
"IC2", "reactorCoolantSix", 1, // IC2 Experimental 60k coolant cell
"IC2", "item.reactorCoolantSix", 0); // IC2 Classic 60k coolant cell
ItemStack itemStackReactorCoolant2 = WarpDriveConfig.getModItemStack("gregtech", "gt.360k_NaK_Coolantcell", 1, // GT5
"IC2", "reactorCoolantSix", 1, // IC2 Experimental 60k coolant cell
"IC2", "item.reactorCoolantSix", 0); // IC2 Classic 60k coolant cell
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.itemIC2reactorLaserFocus), false, "cld", "lhl", "dlc",
'l', ItemComponent.getItemStack(EnumComponentType.LENS),
'h', itemStackOverclockedHeatVent,
@ -1311,10 +1339,13 @@ public class Recipes {
// Cloaking coil is 1 Titanium plate, 4 reinforced iridium plate, 1 EV Machine casing (Ti) or 1 Beacon, 4 emerald, 4 diamond
ItemStack itemStackGoldIngotOrCoil = new ItemStack(Items.gold_ingot);
if (WarpDriveConfig.isGregTech5Loaded) {
if (WarpDriveConfig.isGregTech6Loaded) {
itemStackGoldIngotOrCoil = WarpDriveConfig.getModItemStack("gregtech", "gt.meta.storage.plate", 8663); // Nichrome Coil block, ore:blockPlateNichrome
} else if (WarpDriveConfig.isGregTech5Loaded) {
itemStackGoldIngotOrCoil = WarpDriveConfig.getModItemStack("gregtech", "gt.blockcasings", 14); // Nichrome Coil block
} else if (WarpDriveConfig.isIndustrialCraft2Loaded) {
itemStackGoldIngotOrCoil = WarpDriveConfig.getModItemStack("IC2", "itemRecipePart", 0); // Coil
itemStackGoldIngotOrCoil = WarpDriveConfig.getModItemStack("IC2", "itemRecipePart", 0, // IC2 Experimental Coil
"IC2", "item.reactorPlatingHeat", 0); // IC2 Classic Heat-capacity reactor plating
} else if (WarpDriveConfig.isThermalExpansionLoaded) {
itemStackGoldIngotOrCoil = WarpDriveConfig.getModItemStack("ThermalExpansion", "material", 3); // Redstone conductance coil
} else if (WarpDriveConfig.isImmersiveEngineeringLoaded) {
@ -1631,10 +1662,13 @@ public class Recipes {
// Lower tier coil is iron, copper or coil
Object ironIngotOrCopperIngotOrCoil = new ItemStack(Items.iron_ingot);
if (WarpDriveConfig.isGregTech5Loaded) {
if (WarpDriveConfig.isGregTech6Loaded) {
ironIngotOrCopperIngotOrCoil = itemStackGoldIngotOrCoil; // @TODO revise GT recipes
} else if (WarpDriveConfig.isGregTech5Loaded) {
ironIngotOrCopperIngotOrCoil = itemStackGoldIngotOrCoil; // @TODO revise GT recipes
} else if (WarpDriveConfig.isIndustrialCraft2Loaded) {
ironIngotOrCopperIngotOrCoil = WarpDriveConfig.getModItemStack("IC2", "itemRecipePart", 0); // Coil
ironIngotOrCopperIngotOrCoil = WarpDriveConfig.getModItemStack("IC2", "itemRecipePart", 0, // IC2 Experimental Coil
"IC2", "item.reactorPlatingHeat", 0); // IC2 Classic Heat-capacity reactor plating
} else if (WarpDriveConfig.isThermalExpansionLoaded) {
ironIngotOrCopperIngotOrCoil = WarpDriveConfig.getModItemStack("ThermalExpansion", "material", 1); // Redstone reception coil
} else if (WarpDriveConfig.isImmersiveEngineeringLoaded) {
@ -1741,7 +1775,8 @@ public class Recipes {
// Tier 1 = 5 stone + 4 bronze ingots gives 5
// Tier 1 = 5 stone + 4 aluminium ingots gives 3
if (WarpDriveConfig.isIndustrialCraft2Loaded) {
ItemStack reinforcedStone = WarpDriveConfig.getModItemStack("IC2", "blockAlloy", 0);
ItemStack reinforcedStone = WarpDriveConfig.getModItemStack("IC2", "blockAlloy", 0, // IC2 Experimental reinforced stone
"IC2", "reinforcedStone", 0); // IC2 Classic reinforced stone
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockHulls_plain[0][0], 10, 0), false, "cbc", "bcb", "cbc",
'b', Blocks.obsidian,
'c', reinforcedStone ));
@ -1773,7 +1808,17 @@ public class Recipes {
// Tier 2 = 4 Tier 1 + 4 dark steel ingot gives 4
// Tier 2 = 4 Tier 1 + 4 obsidian gives 4
for (int woolColor = 0; woolColor < 16; woolColor++) {
if (WarpDriveConfig.isGregTech5Loaded) {
if (WarpDriveConfig.isGregTech6Loaded) {
// ore:casingMachineQuadrupleTungstenSteel or gregtech:gt.meta.machine.quadruple:8635
ItemStack tungstensteelReinforcedBlock = WarpDriveConfig.getModItemStack("gregtech", "gt.meta.machine.quadruple", 8635);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockHulls_plain[1][0], 4, BlockColored.func_150031_c(woolColor)), false, " b ", "bcb", " b ",
'b', new ItemStack(WarpDrive.blockHulls_plain[0][0], 4, BlockColored.func_150031_c(woolColor)),
'c', tungstensteelReinforcedBlock ));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockHulls_plain[1][0], 4, BlockColored.func_150031_c(woolColor)), false, "Xb ", "bcb", " b ",
'b', "blockHull1_plain",
'c', tungstensteelReinforcedBlock,
'X', oreDyes[woolColor] ));
} else if (WarpDriveConfig.isGregTech5Loaded) {
ItemStack tungstensteelReinforcedBlock = WarpDriveConfig.getModItemStack("gregtech", "gt.blockreinforced", 3);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockHulls_plain[1][0], 4, BlockColored.func_150031_c(woolColor)), false, " b ", "bcb", " b ",
'b', new ItemStack(WarpDrive.blockHulls_plain[0][0], 4, BlockColored.func_150031_c(woolColor)),
@ -1783,7 +1828,8 @@ public class Recipes {
'c', tungstensteelReinforcedBlock,
'X', oreDyes[woolColor] ));
} else if (WarpDriveConfig.isIndustrialCraft2Loaded) {
ItemStack carbonPlate = WarpDriveConfig.getModItemStack("IC2", "itemPartCarbonPlate", 0);
ItemStack carbonPlate = WarpDriveConfig.getModItemStack("IC2", "itemPartCarbonPlate", 0, // IC2 Experimental carbon plate
"IC2", "item.itemPartCarbonPlate", 0); // IC2 Classic carbon plate
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.blockHulls_plain[1][0], 4, BlockColored.func_150031_c(woolColor)), false, "cbc", "b b", "cbc",
'b', new ItemStack(WarpDrive.blockHulls_plain[0][0], 4, BlockColored.func_150031_c(woolColor)),
'c', carbonPlate ));

View file

@ -51,6 +51,7 @@ import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
@ -69,6 +70,7 @@ import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.oredict.OreDictionary;
public class WarpDriveConfig {
@ -113,6 +115,7 @@ public class WarpDriveConfig {
public static boolean isArsMagica2Loaded = false;
public static boolean isImmersiveEngineeringLoaded = false;
public static boolean isGregTech5Loaded = false;
public static boolean isGregTech6Loaded = false;
public static boolean isEnderIOLoaded = false;
public static boolean isAdvancedRepulsionSystemLoaded = false;
public static boolean isNotEnoughItemsLoaded = false;
@ -380,13 +383,52 @@ public class WarpDriveConfig {
try {
return GameRegistry.findBlock(mod, id);
} catch (Exception exception) {
WarpDrive.logger.info("Failed to get mod block for " + mod + ":" + id);
WarpDrive.logger.info(String.format("Failed to get mod block for %s:%s", mod, id));
exception.printStackTrace();
}
return Blocks.fire;
}
public static ItemStack getModItemStack(final String mod, final String id, final int meta) {
final ItemStack itemStack = getModItemStackOrNull(mod, id, meta);
if (itemStack != null) {
return itemStack;
}
return new ItemStack(Blocks.fire);
}
public static ItemStack getModItemStack(final String mod1, final String id1, final int meta1,
final String mod2, final String id2, final int meta2) {
ItemStack itemStack = getModItemStackOrNull(mod1, id1, meta1);
if (itemStack != null) {
return itemStack;
}
itemStack = getModItemStackOrNull(mod2, id2, meta2);
if (itemStack != null) {
return itemStack;
}
return new ItemStack(Blocks.fire);
}
public static ItemStack getModItemStack(final String mod1, final String id1, final int meta1,
final String mod2, final String id2, final int meta2,
final String mod3, final String id3, final int meta3) {
ItemStack itemStack = getModItemStackOrNull(mod1, id1, meta1);
if (itemStack != null) {
return itemStack;
}
itemStack = getModItemStackOrNull(mod2, id2, meta2);
if (itemStack != null) {
return itemStack;
}
itemStack = getModItemStackOrNull(mod3, id3, meta3);
if (itemStack != null) {
return itemStack;
}
return new ItemStack(Blocks.fire);
}
private static ItemStack getModItemStackOrNull(final String mod, final String id, final int meta) {
try {
ItemStack item = new ItemStack((Item) Item.itemRegistry.getObject(mod + ":" + id));
if (meta != -1) {
@ -394,13 +436,26 @@ public class WarpDriveConfig {
}
return item;
} catch (Exception exception) {
WarpDrive.logger.info("Failed to get mod item for " + mod + ":" + id + "@" + meta);
WarpDrive.logger.info(String.format("Failed to get mod item for %s:%s@%d", mod, id, meta));
return null;
}
return new ItemStack(Blocks.fire);
}
protected static double[] getDoubleList(final Configuration config, final String categoy, final String key, final String comment, final double[] valuesDefault) {
double[] valuesRead = config.get(categoy, key, valuesDefault, comment).getDoubleList();
public static ItemStack getOreDictionaryEntry(final String ore) {
if (!OreDictionary.doesOreNameExist(ore)) {
WarpDrive.logger.info("Failed to get ore named " + ore);
return new ItemStack(Blocks.fire);
}
final ArrayList<ItemStack> itemStacks = OreDictionary.getOres(ore);
if (itemStacks.isEmpty()) {
WarpDrive.logger.info(String.format("Failed to get item from empty ore dictionary '%s'", ore));
return new ItemStack(Blocks.fire);
}
return itemStacks.get(0);
}
protected static double[] getDoubleList(final Configuration config, final String category, final String key, final String comment, final double[] valuesDefault) {
double[] valuesRead = config.get(category, key, valuesDefault, comment).getDoubleList();
if (valuesRead.length != valuesDefault.length) {
valuesRead = valuesDefault.clone();
}
@ -957,9 +1012,15 @@ public class WarpDriveConfig {
CompatImmersiveEngineering.register();
}
isGregTech5Loaded = false;
isGregTech6Loaded = false;
if (Loader.isModLoaded("gregtech")) {
String gregTechVersion = FMLCommonHandler.instance().findContainerFor("gregtech").getVersion();
final String gregTechVersion = FMLCommonHandler.instance().findContainerFor("gregtech").getVersion();
isGregTech5Loaded = gregTechVersion.equalsIgnoreCase("MC1710") || gregTechVersion.startsWith("5.");
isGregTech6Loaded = gregTechVersion.startsWith("GT6-MC1710");
if ( (isGregTech5Loaded && isGregTech6Loaded)
|| (!isGregTech5Loaded && !isGregTech6Loaded) ) {
throw new RuntimeException(String.format("Unsupported gregtech version '%s', please report to mod author", gregTechVersion));
}
}
isEnderIOLoaded = Loader.isModLoaded("EnderIO");
if (isEnderIOLoaded) {