diff options
Diffstat (limited to 'src/Java/gtPlusPlus/core')
-rw-r--r-- | src/Java/gtPlusPlus/core/item/chemistry/CoalTar.java | 4 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java | 84 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/core/util/minecraft/HazmatUtils.java | 138 |
3 files changed, 210 insertions, 16 deletions
diff --git a/src/Java/gtPlusPlus/core/item/chemistry/CoalTar.java b/src/Java/gtPlusPlus/core/item/chemistry/CoalTar.java index 37428b18d6..badd318414 100644 --- a/src/Java/gtPlusPlus/core/item/chemistry/CoalTar.java +++ b/src/Java/gtPlusPlus/core/item/chemistry/CoalTar.java @@ -5,7 +5,6 @@ import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_OreDictUnificator; import gtPlusPlus.api.objects.minecraft.ItemPackage; -import gtPlusPlus.core.item.ModItems; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.Utils; @@ -289,6 +288,7 @@ public class CoalTar extends ItemPackage { FluidStack aGtAcid = FluidUtils.getFluidStack("phtalicacid", 500); if (aMyAcid != null && aGtAcid != null) { CORE.RA.addDistilleryRecipe(CI.getNumberedBioCircuit(8), aMyAcid, aGtAcid, null, 50, 16, false); + CORE.RA.addDistilleryRecipe(CI.getNumberedBioCircuit(9), aGtAcid, aMyAcid, null, 50, 16, false); } } @@ -354,7 +354,7 @@ public class CoalTar extends ItemPackage { Naphthalene = FluidUtils.generateFluidNonMolten("Naphthalene", "Naphthalene", 115, new short[]{210, 185, 135, 100}, null, null); // v - Oxidize with mercury and nitric acid //Create Phthalic Acid - Phthalic_Acid = FluidUtils.generateFluidNonMolten("PhthalicAcid", "Phtalic Acid", 207, new short[]{210, 220, 210, 100}, null, null); + Phthalic_Acid = FluidUtils.generateFluidNonMolten("PhthalicAcid", "Phthalic Acid", 207, new short[]{210, 220, 210, 100}, null, null); // v - Dehydrate at 180C+ //Create Phthalic Anhydride //ItemUtils.generateSpecialUseDusts("PhthalicAnhydride", "Phthalic Anhydride", "C6H4(CO)2O", Utils.rgbtoHexValue(175, 175, 175)); diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java index d152e9afd2..817683cb1e 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java @@ -108,16 +108,16 @@ public class RECIPES_GREGTECH { addFuels(); } - + private static void chemplantRecipes() { //This is subsequently absorbed in water to form nitric acid and nitric oxide. - //3 NO2 (g) + H2O (l) → 2 HNO3 (aq) + NO (g) (ΔH = −117 kJ/mol) - //The nitric oxide is cycled back for reoxidation. Alternatively, if the last step is carried out in air: - //4 NO2 (g) + O2 (g) + 2 H2O (l) → 4 HNO3 (aq) - + //3 NO2 (g) + H2O (l) → 2 HNO3 (aq) + NO (g) (ΔH = −117 kJ/mol) + //The nitric oxide is cycled back for reoxidation. Alternatively, if the last step is carried out in air: + //4 NO2 (g) + O2 (g) + 2 H2O (l) → 4 HNO3 (aq) + // Advanced method for Nitric Acid Production CORE.RA.addChemicalPlantRecipe( new ItemStack[] { @@ -158,7 +158,7 @@ public class RECIPES_GREGTECH { FLUORIDES.FLUORITE.getOre(4), }, new FluidStack[] { - + }, new int[] { 0, 2500, 2000, 1500 @@ -166,7 +166,7 @@ public class RECIPES_GREGTECH { 10 * 20, 1024, 5); - + // Advanced recipe for Fluorine Production CORE.RA.addChemicalPlantRecipe( new ItemStack[] { @@ -186,7 +186,7 @@ public class RECIPES_GREGTECH { FLUORIDES.FLUORITE.getOre(2), }, new FluidStack[] { - + }, new int[] { 7500, 1500, 1000, 500 @@ -194,7 +194,7 @@ public class RECIPES_GREGTECH { 10 * 20, 1024, 5); - + CORE.RA.addChemicalPlantRecipe( new ItemStack[] { CI.getNumberedAdvancedCircuit(16), @@ -214,7 +214,7 @@ public class RECIPES_GREGTECH { 10 * 20, 480, 2); - + // Produce Boric Acid CORE.RA.addChemicalPlantRecipe( new ItemStack[] { @@ -235,7 +235,7 @@ public class RECIPES_GREGTECH { 20 * 30, MaterialUtils.getVoltageForTier(3), 3); - + // Produce Th232 CORE.RA.addChemicalPlantRecipe( new ItemStack[] { @@ -261,7 +261,7 @@ public class RECIPES_GREGTECH { 20 * 300, MaterialUtils.getVoltageForTier(4), 4); - + // Modify Sapling into Pine Sapling CORE.RA.addChemicalPlantRecipe( new ItemStack[] { @@ -276,12 +276,68 @@ public class RECIPES_GREGTECH { ItemUtils.getSimpleStack(BOP_Block_Registrator.sapling_Pine, 16) }, new FluidStack[] { - + }, 120 * 20, 64, 2); + + // Convert GT++ Plutonium239 into normal Plutonium + if (Materials.Plutonium.mDefaultLocalName.equals("Plutonium 239")) { + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(16), + ELEMENT.getInstance().PLUTONIUM239.getDust(1) + }, + new FluidStack[] { + + }, + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustPlutonium", 1) + }, + new FluidStack[] { + + }, + 5 * 20, + 1, + 2); + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(16), + ELEMENT.getInstance().PLUTONIUM239.getSmallDust(1) + }, + new FluidStack[] { + + }, + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallPlutonium", 1) + }, + new FluidStack[] { + + }, + 5 * 20, + 1, + 2); + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(16), + ELEMENT.getInstance().PLUTONIUM239.getTinyDust(1) + }, + new FluidStack[] { + + }, + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyPlutonium", 1) + }, + new FluidStack[] { + + }, + 5 * 20, + 1, + 2); + } + } private static void fluidheaterRecipes() { @@ -607,7 +663,7 @@ public class RECIPES_GREGTECH { ItemUtils.getSimpleStack(ModItems.itemChargePack_High_3, 1), ItemUtils.getSimpleStack(ModItems.itemChargePack_High_4, 1), }; - + int aCurrSlot = 0; for (int h = 6; h < 10; h++) { CORE.RA.addAssemblylineRecipe( diff --git a/src/Java/gtPlusPlus/core/util/minecraft/HazmatUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/HazmatUtils.java index f0b93a32dc..137b05d85a 100644 --- a/src/Java/gtPlusPlus/core/util/minecraft/HazmatUtils.java +++ b/src/Java/gtPlusPlus/core/util/minecraft/HazmatUtils.java @@ -3,6 +3,7 @@ package gtPlusPlus.core.util.minecraft; import static gregtech.api.GregTech_API.*; import java.lang.reflect.Field; +import java.lang.reflect.Method; import java.util.HashMap; import cpw.mods.fml.common.eventhandler.SubscribeEvent; @@ -101,6 +102,143 @@ public class HazmatUtils { addProtection(aItem); } Logger.INFO("[Hazmat] Registered EMT Items as hazmat gear."); + } + + if (LoadedMods.isModLoaded("DraconicEvolution")) { + AutoMap<Field> aItemFields = new AutoMap<Field>(); + Class aItemsDE = ReflectionUtils.getClass("com.brandon3055.draconicevolution.ModItems"); + + aItemFields.add(ReflectionUtils.getField(aItemsDE, "draconicHelm")); + aItemFields.add(ReflectionUtils.getField(aItemsDE, "draconicChest")); + aItemFields.add(ReflectionUtils.getField(aItemsDE, "draconicLeggs")); + aItemFields.add(ReflectionUtils.getField(aItemsDE, "draconicBoots")); + aItemFields.add(ReflectionUtils.getField(aItemsDE, "wyvernHelm")); + aItemFields.add(ReflectionUtils.getField(aItemsDE, "wyvernChest")); + aItemFields.add(ReflectionUtils.getField(aItemsDE, "wyvernLeggs")); + aItemFields.add(ReflectionUtils.getField(aItemsDE, "wyvernBoots")); + AutoMap<ItemStack> aItemMap = new AutoMap<ItemStack>(); + for (Field aItemField : aItemFields) { + Item aItemObject = null; + if (aItemField != null) { + try { + aItemObject = (Item) aItemField.get(null); + } + catch (Exception t) { + t.printStackTrace(); + } + } + if (aItemObject != null) { + aItemMap.add(ItemUtils.getSimpleStack(aItemObject)); + } + else { + Logger.INFO("[Hazmat] Could not get "+aItemField.getName()+" from "+aItemsDE.getName()); + } + } + Logger.INFO("[Hazmat] Registering "+aItemMap.size()+" Draconic Evolution Items as hazmat gear."); + for (ItemStack aItem : aItemMap) { + addProtection(aItem); + } + Logger.INFO("[Hazmat] Registered Draconic Evolution Items as hazmat gear."); + } + + if (LoadedMods.isModLoaded("TaintedMagic")) { + AutoMap<Field> aItemFields = new AutoMap<Field>(); + Class aItemsTaintedMagic = ReflectionUtils.getClass("taintedmagic.common.registry.ItemRegistry"); + + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemShadowFortressHelmet")); + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemShadowFortressChestplate")); + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemShadowFortressLeggings")); + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemVoidwalkerBoots")); + AutoMap<ItemStack> aItemMap = new AutoMap<ItemStack>(); + for (Field aItemField : aItemFields) { + Item aItemObject = null; + if (aItemField != null) { + try { + aItemObject = (Item) aItemField.get(null); + } + catch (Exception t) { + t.printStackTrace(); + } + } + if (aItemObject != null) { + aItemMap.add(ItemUtils.getSimpleStack(aItemObject)); + } + else { + Logger.INFO("[Hazmat] Could not get "+aItemField.getName()+" from "+aItemsTaintedMagic.getName()); + } + } + Logger.INFO("[Hazmat] Registering "+aItemMap.size()+" Tainted Magic Items as hazmat gear."); + for (ItemStack aItem : aItemMap) { + addProtection(aItem); + } + Logger.INFO("[Hazmat] Registered Tainted Magic Items as hazmat gear."); + } + + if (LoadedMods.isModLoaded("WitchingGadgets")) { + AutoMap<Field> aItemFields = new AutoMap<Field>(); + Class aItemsTaintedMagic = ReflectionUtils.getClass("witchinggadgets.common.WGContent"); + + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemPrimordialHelm")); + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemPrimordialChest")); + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemPrimordialLegs")); + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemPrimordialBoots")); + AutoMap<ItemStack> aItemMap = new AutoMap<ItemStack>(); + for (Field aItemField : aItemFields) { + Item aItemObject = null; + if (aItemField != null) { + try { + aItemObject = (Item) aItemField.get(null); + } + catch (Exception t) { + t.printStackTrace(); + } + } + if (aItemObject != null) { + aItemMap.add(ItemUtils.getSimpleStack(aItemObject)); + } + else { + Logger.INFO("[Hazmat] Could not get "+aItemField.getName()+" from "+aItemsTaintedMagic.getName()); + } + } + Logger.INFO("[Hazmat] Registering "+aItemMap.size()+" Witching Gadgets Items as hazmat gear."); + for (ItemStack aItem : aItemMap) { + addProtection(aItem); + } + Logger.INFO("[Hazmat] Registered Witching Gadgets Items as hazmat gear."); + } + + if (LoadedMods.isModLoaded("ThaumicTinkerer")) { + AutoMap<Item> aItems = new AutoMap<Item>(); + Class aMainTT = ReflectionUtils.getClass("thaumic.tinkerer.common.ThaumicTinkerer"); + Class aItemRegistryTT = ReflectionUtils.getClass("thaumic.tinkerer.common.registry.TTRegistry"); + Field aRegistryInstance = ReflectionUtils.getField(aMainTT, "registry"); + Object aRegistry = ReflectionUtils.getFieldValue(aRegistryInstance); + Method aFuckingStupidMethodHandlingMethod = ReflectionUtils.getMethod(aItemRegistryTT, "getFirstItemFromClass", new Class[] {Class.class}); + Item aIchorHelm = (Item) ReflectionUtils.invokeNonBool(aRegistry, aFuckingStupidMethodHandlingMethod, new Object[] {ReflectionUtils.getClass("thaumic.tinkerer.common.item.kami.armor.ItemGemHelm")}); + Item aIchorChest = (Item) ReflectionUtils.invokeNonBool(aRegistry, aFuckingStupidMethodHandlingMethod, new Object[] {ReflectionUtils.getClass("thaumic.tinkerer.common.item.kami.armor.ItemGemChest")}); + Item aIchorLegs = (Item) ReflectionUtils.invokeNonBool(aRegistry, aFuckingStupidMethodHandlingMethod, new Object[] {ReflectionUtils.getClass("thaumic.tinkerer.common.item.kami.armor.ItemGemLegs")}); + Item aIchorBoots = (Item) ReflectionUtils.invokeNonBool(aRegistry, aFuckingStupidMethodHandlingMethod, new Object[] {ReflectionUtils.getClass("thaumic.tinkerer.common.item.kami.armor.ItemGemBoots")}); + aItems.add(aIchorHelm); + aItems.add(aIchorChest); + aItems.add(aIchorLegs); + aItems.add(aIchorBoots); + AutoMap<ItemStack> aItemMap = new AutoMap<ItemStack>(); + int aIndex = 0; + for (Item aItem : aItems) { + Item aItemObject = null; + if (aItem != null) { + aItemMap.add(ItemUtils.getSimpleStack(aItemObject)); + } + else { + Logger.INFO("[Hazmat] Could not get item "+aIndex+" from "+aItemRegistryTT.getName()); + } + aIndex++; + } + Logger.INFO("[Hazmat] Registering "+aItemMap.size()+" Thaumic Tinkerer Items as hazmat gear."); + for (ItemStack aItem : aItemMap) { + addProtection(aItem); + } + Logger.INFO("[Hazmat] Registered Thaumic Tinkerer Items as hazmat gear."); } if (LoadedMods.isModLoaded("GraviSuite")) { |