diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Java/miscutil/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java | 95 | ||||
-rw-r--r-- | src/resources/assets/ic2/lang/en_US.lang | 6 |
2 files changed, 24 insertions, 77 deletions
diff --git a/src/Java/miscutil/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java b/src/Java/miscutil/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java index 40912b3247..36a61f84e3 100644 --- a/src/Java/miscutil/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java +++ b/src/Java/miscutil/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java @@ -4,25 +4,12 @@ import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_OreDictUnificator; -import ic2.core.Ic2Items; -import ic2.core.init.InternalName; -import ic2.core.item.resources.ItemCell; - -import java.util.HashMap; -import java.util.IdentityHashMap; -import java.util.Map; - import miscutil.core.lib.LoadedMods; import miscutil.core.util.Utils; import miscutil.core.util.fluid.FluidUtils; import miscutil.core.util.item.UtilsItems; import miscutil.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; import miscutil.xmod.gregtech.common.Meta_GT_Proxy; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.EnumHelper; -import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; public class GregtechFluidHandler { @@ -58,7 +45,8 @@ public class GregtechFluidHandler { } if (LoadedMods.IndustrialCraft2){ - Utils.LOG_INFO("Adding in GT Fluids for Molten Salt, Cooled Salt and Various other Nuclide related content."); + Utils.LOG_INFO("Adding in GT Fluids for various nuclear related content."); + Meta_GT_Proxy.addFluid("hydrofluoricAcid", "Hydrofluoric Acid", GT_Materials.HydrofluoricAcid, 1, 120, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.HydrofluoricAcid, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); generateIC2FluidCell("HydrofluoricAcid"); @@ -81,11 +69,11 @@ public class GregtechFluidHandler { generateIC2FluidCell("ThoriumTetraFluoride"); + //Check for IHL Hydrogen Chloride if (!LoadedMods.IHL || UtilsItems.getItemStackOfAmountFromOreDict("cellHydrogenChloride", 1) == null){ - if (FluidUtils.getFluidStack("hydrogenchloride", 1) == null){ if (LoadedMods.IHL){ - Utils.LOG_INFO("IHL Loaded but hydrogen chloride could not be found for some reason. Adding our own."); + Utils.LOG_INFO("IHL Loaded but hydrogen chloride could not be found for some reason. How about we add our own."); } else { Utils.LOG_INFO("No Suitable versions of Hydrogen Chloride available, adding our own."); @@ -94,7 +82,9 @@ public class GregtechFluidHandler { generateIC2FluidCell("HydrogenChloride"); } } - + + + //Chemical Bath Recipes GT_Values.RA.addChemicalRecipe( UtilsItems.getItemStackOfAmountFromOreDict("dustApatite", 16), null, @@ -103,18 +93,30 @@ public class GregtechFluidHandler { UtilsItems.getItemStackOfAmountFromOreDict("dustSmallSulfur", 1), 20*20); + + + + + + + + //Mixer Recipes GT_Values.RA.addMixerRecipe(UtilsItems.getItemStackOfAmountFromOreDict("dustSulfur", 1), null, null, null, FluidUtils.getFluidStack("oxygen", 266), FluidUtils.getFluidStack("sulfurdioxide", 399), null, 600, 60); GT_Values.RA.addMixerRecipe(UtilsItems.getItemStackOfAmountFromOreDict("dustUranium235", 1), UtilsItems.getItemStackOfAmountFromOreDict("dustUranium235", 1), null, null, FluidUtils.getFluidStack("hydrofluoricacid", 2000), FluidUtils.getFluidStack("uraniumtetrafluoride", 266), null, 3000, 500); GT_Values.RA.addMixerRecipe(UtilsItems.getItemStackOfAmountFromOreDict("cellFluorine", 1), UtilsItems.getItemStackOfAmountFromOreDict("cellFluorine", 1), null, null, FluidUtils.getFluidStack("uraniumtetrafluoride", 665), FluidUtils.getFluidStack("uraniumhexafluoride", 266), null, 5000, 2000); + + + + + + //Apatite Distillation /* * so if you dissolve aparite in sulphuric acid * you'll get a mixture of SO2, H2O, HF and HCl */ - - FluidStack[] apatiteOutput = { FluidUtils.getFluidStack("sulfurousacid", 3800), FluidUtils.getFluidStack("hydrogenchloride", 1000), @@ -148,24 +150,9 @@ public class GregtechFluidHandler { 5*20, 30); - - - - - - - - - - - - - - } } - private static void generateIC2FluidCell(String fluidNameWithCaps){ Utils.LOG_INFO("Adding a Cell for "+fluidNameWithCaps); if (LoadedMods.IndustrialCraft2){ @@ -173,44 +160,4 @@ public class GregtechFluidHandler { } } - public static <T extends Enum<? >> T addEnum(Class<T> enumType, String enumName, Class<?>[] paramTypes, Object[] paramValues) { - return null; - } - - private static Map<Integer, InternalName> names = new HashMap<Integer, InternalName>(); - private static Map<Block, ItemStack> cells = new IdentityHashMap<Block, ItemStack>(); - - public static boolean setUpNewFluidCell(int meta, String name){ - try { - InternalName fluidName = EnumHelper.addEnum(InternalName.class, name, new Class[0], new Object[0]); - //EnumHelper.addEnum(InternalName.class, "InternalName", name); - if (fluidName.valueOf(name) != null){ - addRegisterCell(meta, fluidName); - return true; - } - Utils.LOG_INFO("Secondary Cell Method failed."); - return false; - } catch (Throwable r) { - Utils.LOG_INFO("Secondary Cell Method failed.."); - Utils.LOG_INFO("Reason: "+r.getMessage()); - Utils.LOG_INFO("Reason: "+r); - r.printStackTrace(); - return false; - } - } - - private static ItemStack addCell(int meta, InternalName name){ - ItemCell itemCell = new ItemCell(InternalName.valueOf(name.name())); - names.put(Integer.valueOf(meta), InternalName.valueOf(name.name())); - ItemStack ret = new ItemStack(itemCell, 1, meta); - cells.put(Blocks.air, ret); - return ret; - } - - private static ItemStack addRegisterCell(int meta, InternalName name){ - ItemStack ret = addCell(meta, name); - FluidContainerRegistry.registerFluidContainer(FluidUtils.getFluidStack("air", 0), ret.copy(), Ic2Items.cell.copy()); - return ret; - } - } diff --git a/src/resources/assets/ic2/lang/en_US.lang b/src/resources/assets/ic2/lang/en_US.lang index fca4f6cee6..259ae2ec7b 100644 --- a/src/resources/assets/ic2/lang/en_US.lang +++ b/src/resources/assets/ic2/lang/en_US.lang @@ -19,6 +19,6 @@ ic2.HydrofluoricAcid=Hydrofluoric Acid Cell ic2.SulfurDioxide=Sulfur Dioxide Cell ic2.SulfuricApatite=Sulfuric Apatite Cell ic2.SulfurousAcid=Sulfurous Acid Cell -ic2.UraniumHexaFluoride=Uranium HexaFluoride Cell -ic2.ThoriumTetraFluoride=Thorium TetraFluoride Cell -ic2.UraniumTetraFluoride=Uranium TetraFluoride Cell +ic2.UraniumHexaFluoride=Uranium Hexafluoride Cell +ic2.ThoriumTetraFluoride=Thorium Tetrafluoride Cell +ic2.UraniumTetraFluoride=Uranium Tetrafluoride Cell |