diff options
Diffstat (limited to 'src/main/java/gregtech')
9 files changed, 286 insertions, 523 deletions
diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index a2069f0d05..4b36ce74ee 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -817,7 +817,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { */ //TODO: add other op materials? maybe some new ores or new only fusion made op materials from op materials??? like neutronium bedrockium alloy etc. public static Materials InfinityCatalyst = new Materials( 394, TextureSet.SET_SHINY , 64.0F,1310720, 10, 1|2 |8 |64|128 , 255, 255, 255, 0, "InfinityCatalyst" , "Infinity Catalyst" , 5, 500000, 10800, 10800, true, false, 20, 1, 1, Dyes.dyeLightGray ); - public static Materials Infinity = new Materials( 397, TextureSet.SET_CUSTOM("infinity"), 256.0F,2621440, 17, 1|2 |64|128 , 255, 255, 255, 0, "Infinity" , "Infinity" , 5, 5000000, 10800, 10800, true, false, 40, 1, 1, Dyes.dyeLightGray ); + public static Materials Infinity = new Materials( 397, new TextureSet("infinity", true), 256.0F,2621440, 17, 1|2 |64|128 , 255, 255, 255, 0, "Infinity" , "Infinity" , 5, 5000000, 10800, 10800, true, false, 40, 1, 1, Dyes.dyeLightGray ); public static Materials Bedrockium = new MaterialBuilder(395,TextureSet.SET_DULL, "Bedrockium").addOreItems().addDustItems().addMetalItems().setDurability(327680).setToolSpeed(8f).setToolQuality(9).setRGB(50,50,50).setName("Bedrockium").setBlastFurnaceRequired(true).setBlastFurnaceTemp(9900).setMeltingPoint(9900).setColor(Dyes.dyeBlack).setOreValue(4).setDensityDivider(1).setDensityMultiplier(1).constructMaterial(); public static Materials Trinium = new Materials( 868, TextureSet.SET_SHINY , 128.0F, 51200, 8, 1|2 |8 |64|128 , 200, 200, 210, 0, "Trinium" , "Trinium" , 0, 0, 7200, 7200, true, false, 4, 1, 1, Dyes.dyeLightGray ).disableAutoGeneratedBlastFurnaceRecipes(); public static Materials Ichorium = new Materials( 978, TextureSet.SET_SHINY , 32.0F, 850000, 7, 1|2 |8 |32|64|128 , 211, 120, 6, 0, "Ichorium" , "Ichorium" , 5, 250000, 9000, 9000, true, false, 4, 1, 1, Dyes.dyeOrange ); @@ -859,7 +859,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials DimensionallyTranscendentResidue = new Materials( 589, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 0, 0, 0, 1, "DimensionallyTranscendentResidue" , "Dimensionally Transcendent Residue" , -1, -1, 25, 1, false, true, 1, 1, 1, Dyes.dyeBlack); - public static Materials SpaceTime = new Materials( 588, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 0, 0, 255, 240, "SpaceTime" , "SpaceTime" , -1, -1, 14, 0, false, true, 2, 1, 1, Dyes.dyeBlue , Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1))); + public static Materials SpaceTime = new Materials( 588, new TextureSet("spacetime", true) , 1.0F, 0, 2, 1|2|16|64|128, 255, 255, 255, 0, "SpaceTime" , "SpaceTime" , -1, -1, 14, 0, false, true, 2, 1, 1, Dyes._NULL , Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1))); + /** * Materials which are renamed automatically @@ -2256,10 +2257,22 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } private static void addHasGasFluid(Materials aMaterial, String aConfigPath) { - if (aMaterial.mHasPlasma = GregTech_API.sMaterialProperties.get(aConfigPath, "AddPlasma", aMaterial.mHasPlasma)) - GT_Mod.gregtechproxy.addAutogeneratedPlasmaFluid(aMaterial); - if (aMaterial.mHasGas = GregTech_API.sMaterialProperties.get(aConfigPath, "AddGas", aMaterial.mHasGas)) - GT_Mod.gregtechproxy.addFluid(aMaterial.mName.toLowerCase(), aMaterial.mDefaultLocalName, aMaterial, 2, aMaterial.mGasTemp); +// System.out.println("ABC4321 " + aMaterial.mDefaultLocalName + " " + aMaterial.mIconSet.is_custom + " " + aMaterial.mName); +// if (aMaterial.mDefaultLocalName.toLowerCase().contains("spacetime")) { +//// GT_Mod.gregtechproxy.addFluid("molten.spacetime", "Molten SpaceTime", Materials.SpaceTime, 0, 0, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SpaceTime, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 100); +// System.out.println("TESTING 1234"); +// System.out.println("ABC4321 " + aMaterial.mDefaultLocalName + " " + aMaterial.mIconSet.is_custom + " " + aMaterial.mName + " " + aMaterial.mHasPlasma + " " + aMaterial.mHasGas); +// return; +// } + + if (aMaterial.mIconSet.is_custom) { + return; + } else { + if (aMaterial.mHasPlasma = GregTech_API.sMaterialProperties.get(aConfigPath, "AddPlasma", aMaterial.mHasPlasma)) + GT_Mod.gregtechproxy.addAutogeneratedPlasmaFluid(aMaterial); + if (aMaterial.mHasGas = GregTech_API.sMaterialProperties.get(aConfigPath, "AddGas", aMaterial.mHasGas)) + GT_Mod.gregtechproxy.addFluid(aMaterial.mName.toLowerCase(), aMaterial.mDefaultLocalName, aMaterial, 2, aMaterial.mGasTemp); + } } private static void addInternalStuff(Materials aMaterial, String aConfigPath) { diff --git a/src/main/java/gregtech/api/enums/TextureSet.java b/src/main/java/gregtech/api/enums/TextureSet.java index fd82fd676e..6e6ef99e36 100644 --- a/src/main/java/gregtech/api/enums/TextureSet.java +++ b/src/main/java/gregtech/api/enums/TextureSet.java @@ -1,12 +1,9 @@ package gregtech.api.enums; - import gregtech.api.interfaces.IIconContainer; public class TextureSet { - public static final TextureSet SET_CUSTOM(String aTextureFileName) { - return new TextureSet("CUSTOM/" + aTextureFileName); - } + public boolean is_custom = false; public static final TextureSet SET_NONE = new TextureSet("NONE"), @@ -56,6 +53,7 @@ public class TextureSet { private static final String aTextVoidDir = "/void"; public TextureSet(String aSetName) { + boolean is_custom = false; mSetName = aSetName; mTextures[0] = new Textures.ItemIcons.CustomIcon(aTextMatIconDir + mSetName + "/dustTiny"); mTextures[1] = new Textures.ItemIcons.CustomIcon(aTextMatIconDir + mSetName + "/dustSmall"); @@ -186,4 +184,10 @@ public class TextureSet { mTextures[126] = new Textures.ItemIcons.CustomIcon(aTextMatIconDir + mSetName + "/handleMallet"); mTextures[127] = new Textures.ItemIcons.CustomIcon(aTextMatIconDir + mSetName + "/toolHeadMallet"); } + + public TextureSet(String aSetName, boolean is_custom) { + this("CUSTOM/" + aSetName); + this.is_custom = is_custom; + } + } diff --git a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java index fb2f15f49a..4f4f174330 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java @@ -23,21 +23,22 @@ public interface IGT_RecipeAdder { * @param aEnergyNeededForStartingFusion = EU needed for heating the Reactor up (must be >= 0) * @return true if the Recipe got added, otherwise false. */ + + @Deprecated boolean addFusionReactorRecipe(FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion); /** * Adds a Fusion Reactor Recipe * - * @param FluidOutputArray : Array of input fluids. - * @param FluidOutputArray : Array of output fluids. + * @param FluidOutputArray : Array of input fluids. Up to 16. + * @param FluidOutputArray : Array of output fluids. Up to 16. * @param aFusionDurationInTicks : How many ticks the Fusion lasts (must be > 0). - * @param aFusionEnergyPerTick : The EU generated per Tick (can even be negative!). - * @param aEnergyNeededForStartingFusion : EU needed for heating the Reactor up (must be >= 0). - * @return true if the Recipe got added, otherwise false. + * @param aFusionEnergyPerTick : The EU consumed per tick to keep the reaction going. + * @param aEnergyNeededForStartingFusion : EU needed to initialize the fusion reaction. (must be >= 0). + * @return true if the recipe got added, otherwise false. */ boolean addFusionReactorRecipe(FluidStack[] FluidInputArray, FluidStack[] FluidOutputArray, int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion); - /** * Adds a Centrifuge Recipe * @@ -656,11 +657,13 @@ public interface IGT_RecipeAdder { /** * Adds a Recipe for the Laser Engraver. */ + @Deprecated boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt); /** * Adds a Recipe for the Laser Engraver. */ + @Deprecated boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt, boolean aCleanroom); /** diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java index 833059f195..1907245715 100644 --- a/src/main/java/gregtech/api/util/GT_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Recipe.java @@ -1966,7 +1966,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { private static final int FLUID_OUTPUT_COUNT = 4; public GT_Recipe_Map_LargeChemicalReactor() { - super(new HashSet<>(1000), "gt.recipe.largechemicalreactor", "Large Chemical Reactor", null, RES_PATH_GUI + "basicmachines/Default", 2, OUTPUT_COUNT, 0, 0, 1, E, 1, E, true, true); + super(new HashSet<>(1000), "gt.recipe.largechemicalreactor", "Large Chemical Reactor", null, RES_PATH_GUI + "basicmachines/LCRNEI", 2, OUTPUT_COUNT, 0, 0, 1, E, 1, E, true, true); } @Override diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 8491ea328c..dc8ca19220 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -1821,25 +1821,42 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { return 0; } + + // ------------------------ Adds all fluids corresponding to materials ------------------------ + public Fluid addAutoGeneratedCorrespondingFluid(Materials aMaterial){ - return addFluid(aMaterial.mName.toLowerCase(Locale.ENGLISH), "molten.autogenerated", aMaterial.mDefaultLocalName, aMaterial, - aMaterial.mRGBa, 1, aMaterial.getLiquidTemperature(), GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L), 1000); - } + // If the fluid is registered as custom inside the Material's constructor then to add custom fluid + // textures go to blocks/fluids and place the .png. File should be called fluid.fluid.{unlocalised_name}.png. All lower case. + String fluidTexture = aMaterial.mIconSet.is_custom ? ("fluid." + aMaterial.mName.toLowerCase()) : "molten.autogenerated"; + return addFluid(aMaterial.mName.toLowerCase(Locale.ENGLISH), fluidTexture, aMaterial.mDefaultLocalName, aMaterial, + aMaterial.mRGBa, 1, aMaterial.getLiquidTemperature(), GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L), 1000); + } public Fluid addAutoGeneratedCorrespondingGas(Materials aMaterial) { - return addFluid(aMaterial.mName.toLowerCase(Locale.ENGLISH), "molten.autogenerated", aMaterial.mDefaultLocalName, aMaterial, - aMaterial.mRGBa, 2, aMaterial.getGasTemperature(), GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L), 1000); + // If the fluid is registered as custom inside the Material's constructor then to add custom fluid + // textures go to blocks/fluids and place the .png. File should be called fluid.gas.{unlocalised_name}.png. All lower case. + String fluidTexture = aMaterial.mIconSet.is_custom ? ("gas." + aMaterial.mName.toLowerCase()) : "molten.autogenerated"; + return addFluid(aMaterial.mName.toLowerCase(Locale.ENGLISH), fluidTexture, aMaterial.mDefaultLocalName, aMaterial, + aMaterial.mRGBa, 2, aMaterial.getGasTemperature(), GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L), 1000); + } + + public Fluid addAutogeneratedPlasmaFluid(Materials aMaterial) { + // If the fluid is registered as custom inside the Material's constructor then to add custom fluid + // textures go to blocks/fluids and place the .png. File should be called fluid.plasma.{unlocalised_name}.png. All lower case. + String fluidTexture = aMaterial.mIconSet.is_custom ? ("plasma." + aMaterial.mName.toLowerCase()) : "plasma.autogenerated"; + return addFluid("plasma." + aMaterial.mName.toLowerCase(Locale.ENGLISH), fluidTexture, aMaterial.mDefaultLocalName + " Plasma", aMaterial, + aMaterial.mMoltenRGBa, 3, 10000, GT_OreDictUnificator.get(OrePrefixes.cellPlasma, aMaterial, 1L), ItemList.Cell_Empty.get(1L), aMaterial.getMolten(1) != null ? 144 : 1000); } public Fluid addAutogeneratedMoltenFluid(Materials aMaterial) { - return addFluid("molten." + aMaterial.mName.toLowerCase(Locale.ENGLISH), "molten.autogenerated", "Molten " + aMaterial.mDefaultLocalName, aMaterial, + // If the fluid is registered as custom inside the Material's constructor then to add custom fluid + // textures go to blocks/fluids and place the .png. File should be called fluid.molten.{unlocalised_name}.png. All lower case. + String fluidTexture = aMaterial.mIconSet.is_custom ? ("molten." + aMaterial.mName.toLowerCase()) : "molten.autogenerated"; + return addFluid("molten." + aMaterial.mName.toLowerCase(Locale.ENGLISH), fluidTexture, "Molten " + aMaterial.mDefaultLocalName, aMaterial, aMaterial.mMoltenRGBa, 4, aMaterial.mMeltingPoint <= 0 ? 1000 : aMaterial.mMeltingPoint, GT_OreDictUnificator.get(OrePrefixes.cellMolten, aMaterial, 1L), ItemList.Cell_Empty.get(1L), 144); } - public Fluid addAutogeneratedPlasmaFluid(Materials aMaterial) { - return addFluid("plasma." + aMaterial.mName.toLowerCase(Locale.ENGLISH), "plasma.autogenerated", aMaterial.mDefaultLocalName + " Plasma", aMaterial, - aMaterial.mMoltenRGBa, 3, 10000, GT_OreDictUnificator.get(OrePrefixes.cellPlasma, aMaterial, 1L), ItemList.Cell_Empty.get(1L), aMaterial.getMolten(1) != null ? 144 : 1000); - } + // ------------------------------------------------------------------------------------------------------------ public void addAutoGeneratedHydroCrackedFluids(Materials aMaterial){ Fluid[] crackedFluids = new Fluid[3]; @@ -1910,6 +1927,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public Fluid addFluid(String aName, String aTexture, String aLocalized, Materials aMaterial, short[] aRGBa, int aState, int aTemperatureK, ItemStack aFullContainer, ItemStack aEmptyContainer, int aFluidAmount) { aName = aName.toLowerCase(Locale.ENGLISH); + Fluid rFluid = new GT_Fluid(aName, aTexture, aRGBa != null ? aRGBa : Dyes._NULL.getRGBA()); GT_LanguageManager.addStringLocalization(rFluid.getUnlocalizedName(), aLocalized == null ? aName : aLocalized); if (FluidRegistry.registerFluid(rFluid)) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java index 34c38537a9..97bda10e2f 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java @@ -195,6 +195,7 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul // Vital recipe info. mEUt = -tRecipe.mEUt; mMaxProgresstime = tRecipe.mDuration; + mMaxProgresstime = Math.max(1, mMaxProgresstime); // Outputs. mOutputItems = tRecipe.mOutputs.clone(); @@ -223,15 +224,23 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul if (mOutputBusses.size() > 3) return false; - if (mInputHatches.size() > 3) + // Numerous input hatches required to satisfy fluid inputs for superconductor recipes. + if (mInputHatches.size() > 6) return false; if (mOutputHatches.size() > 3) return false; + // Check that there is between 1 and 2 energy hatches in the multi. if (!((mEnergyHatches.size() == 1) || (mEnergyHatches.size() == 2))) return false; + // Check whether each energy hatch is the same tier. + byte tier_of_hatch = mEnergyHatches.get(0).mTier; + for(GT_MetaTileEntity_Hatch_Energy energyHatch : mEnergyHatches) { + if (energyHatch.mTier != tier_of_hatch) { return false; } + } + if (mMaintenanceHatches.size() != 1) return false; diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index c3c43dbb7d..280234bf7d 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -620,110 +620,113 @@ public class GT_MachineRecipeLoader implements Runnable { // Neutronium Smelting. GT_Values.RA.addPlasmaForgeRecipe( new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.ExcitedDTCC.getFluid(20645L), Materials.Iron.getMolten(73728L)}, + new FluidStack[]{Materials.ExcitedDTCC.getFluid(22119L), Materials.Iron.getMolten(73728L)}, new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(2580L), Materials.Neutronium.getMolten(73728L)}, - 2500, 50331648, 10900); + new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(22119L/8), Materials.Neutronium.getMolten(73728L)}, + 2500, 25_165_824, 10900); GT_Values.RA.addPlasmaForgeRecipe( new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.ExcitedDTPC.getFluid(9861L), Materials.Iron.getMolten(147456L)}, + new FluidStack[]{Materials.ExcitedDTPC.getFluid(10241L), Materials.Iron.getMolten(147456L)}, new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(2465L), Materials.Neutronium.getMolten(147456L)}, - 1250, 100663296, 11800); + new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(10241L/4), Materials.Neutronium.getMolten(147456L)}, + 1250, 50_331_648, 11800); GT_Values.RA.addPlasmaForgeRecipe( new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.ExcitedDTRC.getFluid(4456L), Materials.Iron.getMolten(294912L)}, + new FluidStack[]{Materials.ExcitedDTRC.getFluid(4553L), Materials.Iron.getMolten(294912L)}, new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(2228L), Materials.Neutronium.getMolten(294912L)}, - 625, 201326592, 12700); + new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(4553L/2), Materials.Neutronium.getMolten(294912L)}, + 625, 100_663_296, 12700); GT_Values.RA.addPlasmaForgeRecipe( new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.ExcitedDTEC.getFluid(1905L), Materials.Iron.getMolten(589824L)}, + new FluidStack[]{Materials.ExcitedDTEC.getFluid(1930L), Materials.Iron.getMolten(589824L)}, new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(1905L), Materials.Neutronium.getMolten(589824L)}, - 312, 402653184, 13600); + new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(1930L), Materials.Neutronium.getMolten(589824L)}, + 312, 201_326_592, 13600); // Cosmic Neutronium Smelting. GT_Values.RA.addPlasmaForgeRecipe( new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.ExcitedDTCC.getFluid(35283L), Materials.Copper.getMolten(73728L)}, + new FluidStack[]{Materials.ExcitedDTCC.getFluid(10507L), Materials.Copper.getMolten(512L*144L)}, new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(4410), Materials.CosmicNeutronium.getMolten(73728L)}, - 4200, 51200000, 10900); + new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(10507L/8), Materials.CosmicNeutronium.getMolten(512L*144L)}, + 4200, 7_115_337, 10900); GT_Values.RA.addPlasmaForgeRecipe( new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.ExcitedDTPC.getFluid(16853L), Materials.Copper.getMolten(147456L)}, + new FluidStack[]{Materials.ExcitedDTPC.getFluid(4864L), Materials.Copper.getMolten(1024L*144L)}, new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(4213L), Materials.CosmicNeutronium.getMolten(147456L)}, - 2100, 102400000, 11800); + new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(4864L/4), Materials.CosmicNeutronium.getMolten(1024L*144L)}, + 2100, 14_230_674, 11800); GT_Values.RA.addPlasmaForgeRecipe( new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.ExcitedDTRC.getFluid(7616L), Materials.Copper.getMolten(294912L)}, + new FluidStack[]{Materials.ExcitedDTRC.getFluid(2163L), Materials.Copper.getMolten(2048L*144L)}, new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(3808L), Materials.CosmicNeutronium.getMolten(294912L)}, - 1050, 204800000, 12700); + new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(2163L/2), Materials.CosmicNeutronium.getMolten(2048L*144L)}, + 1050, 28_461_349, 12700); GT_Values.RA.addPlasmaForgeRecipe( new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.ExcitedDTEC.getFluid(3256L), Materials.Copper.getMolten(589824L)}, + new FluidStack[]{Materials.ExcitedDTEC.getFluid(917L), Materials.Copper.getMolten(4096L*144L)}, new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(3256L), Materials.CosmicNeutronium.getMolten(589824L)}, - 525, 409600000, 13600); + new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(917L), Materials.CosmicNeutronium.getMolten(4096L*144L)}, + 525, 56_922_697, 13600); + + // Infinity & SC Smelting. + // See core mod. + + // Bedrockium. - // Infinity Smelting. GT_Values.RA.addPlasmaForgeRecipe( new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.ExcitedDTCC.getFluid(91933L), Materials.InfinityCatalyst.getMolten(28800L)}, + new FluidStack[]{Materials.ExcitedDTCC.getFluid(3360L), Materials.Steel.getMolten(2048L*144L)}, new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(11491L), Materials.Infinity.getMolten(28800L)}, - 4200, 112066560, 10900); + new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(3360L/8), Materials.Bedrockium.getMolten(2048L*144L)}, + 3360, 29_659_721, 10900); GT_Values.RA.addPlasmaForgeRecipe( new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.ExcitedDTPC.getFluid(43917), Materials.InfinityCatalyst.getMolten(57600L)}, + new FluidStack[]{Materials.ExcitedDTPC.getFluid(1680L), Materials.Steel.getMolten(4096L*144L)}, new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(10979), Materials.Infinity.getMolten(57600L)}, - 2100, 224133120, 11800); + new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(1680L/4), Materials.Bedrockium.getMolten(4096L*144L)}, + 1680, 59_319_442, 11800); GT_Values.RA.addPlasmaForgeRecipe( new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.ExcitedDTRC.getFluid(19843L), Materials.InfinityCatalyst.getMolten(115200L)}, + new FluidStack[]{Materials.ExcitedDTRC.getFluid(840L), Materials.Steel.getMolten(8192L*144L)}, new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(9921L), Materials.Infinity.getMolten(115200L)}, - 1050, 448266240, 12700); + new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(840L/2), Materials.Bedrockium.getMolten(8192L*144L)}, + 840, 118_638_885, 12700); GT_Values.RA.addPlasmaForgeRecipe( new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.ExcitedDTEC.getFluid(8484L), Materials.InfinityCatalyst.getMolten(230400L)}, + new FluidStack[]{Materials.ExcitedDTEC.getFluid(420L), Materials.Steel.getMolten(16384L*144L)}, new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(8484L), Materials.Infinity.getMolten(230400L)}, - 525, 896532480, 13600); + new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(420L), Materials.Bedrockium.getMolten(16384L*144L)}, + 420, 237_277_769, 13600); // Misc - GT_Values.RA.addPlasmaForgeRecipe( new ItemStack[]{GT_Values.NI}, new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(10000L), Materials.Infinity.getMolten(9216L)}, new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.SpaceTime.getFluid(1L)}, + new FluidStack[]{Materials.SpaceTime.getMolten(1L)}, 2000, 2000000000, 12700); // ----------------------------------------------------------------------------------------------------------------------------- diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java index 36534f0399..7f4fc25bbe 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java @@ -522,10 +522,7 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { GT_Mod.gregtechproxy.addFluid("refinedGlue", "Refined Glue", Materials.Glue, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glue, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); GT_Mod.gregtechproxy.addFluid("hotfryingoil", "Hot Frying Oil", Materials.FryingOilHot, 1, 400, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.FryingOilHot, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("SpaceTime", "SpaceTime", Materials.SpaceTime, 1, 0, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SpaceTime, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("DimensionallyTranscendentResidue", "Dimensionally Transcendent Residue", Materials.DimensionallyTranscendentResidue, 1, 2000000000, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.DimensionallyTranscendentResidue, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("ExcitedDTCC", "Excited Dimensionally Transcendent Crude Catalyst", Materials.ExcitedDTCC, 1, 500000000, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.ExcitedDTCC, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); GT_Mod.gregtechproxy.addFluid("ExcitedDTPC", "Excited Dimensionally Transcendent Prosaic Catalyst", Materials.ExcitedDTPC, 1, 500000000, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.ExcitedDTPC, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); GT_Mod.gregtechproxy.addFluid("ExcitedDTRC", "Excited Dimensionally Transcendent Resplendent Catalyst", Materials.ExcitedDTRC, 1, 500000000, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.ExcitedDTRC, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); diff --git a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java index 153fb03f43..83721b39d5 100644 --- a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java +++ b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java @@ -614,493 +614,209 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { } } - public class CachedDefaultRecipe - extends TemplateRecipeHandler.CachedRecipe { + public class CachedDefaultRecipe extends TemplateRecipeHandler.CachedRecipe { public final GT_Recipe mRecipe; public final List<PositionedStack> mOutputs; public final List<PositionedStack> mInputs; - public CachedDefaultRecipe(GT_Recipe aRecipe) { - super(); - this.mRecipe = aRecipe; - List<PositionedStack> maybeIn; - List<PositionedStack> maybeOut; - - try { - maybeIn = aRecipe.getInputPositionedStacks(); - } catch (NullPointerException npe) { - maybeIn = null; - GT_Log.err.println("CachedDefaultRecipe - Invalid InputPositionedStacks " + aRecipe); - npe.printStackTrace(GT_Log.err); - } - try { - maybeOut = aRecipe.getOutputPositionedStacks(); - } catch (NullPointerException npe) { - maybeOut = null; - GT_Log.err.println("CachedDefaultRecipe - Invalid OutputPositionedStacks " + aRecipe); - npe.printStackTrace(GT_Log.err); + // Draw a grid of fluids and items (in that order). + private void drawNEIItemAndFluidGrid(ItemStack[] ItemArray, FluidStack[] FluidArray, int x_coord_origin, int y_coord_origin, int x_dir_max_items, int y_max_dir_max_items, GT_Recipe Recipe, boolean is_input) { + if (ItemArray.length + FluidArray.length > x_dir_max_items * y_max_dir_max_items) { + GT_Log.err.println("Recipe cannot be properly displayed in NEI due to too many items/fluids."); } - if (maybeIn != null && maybeOut != null) { - mInputs = maybeIn; - mOutputs = maybeOut; - return; - } + int x_max = x_coord_origin + x_dir_max_items * 18; - mOutputs = new ArrayList<>(); - mInputs = new ArrayList<>(); + int x_coord = x_coord_origin; + int y_coord = y_coord_origin; - int tStartIndex = 0; - switch (GT_NEI_DefaultHandler.this.mRecipeMap.mUsualInputCount) { - case 0: - break; - case 1: - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14)); - } - tStartIndex++; - break; - case 2: - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14)); - } - tStartIndex++; - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14)); - } - tStartIndex++; - break; - case 3: - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 14)); - } - tStartIndex++; - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14)); - } - tStartIndex++; - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14)); - } - tStartIndex++; - break; - case 4: - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 5)); - } - tStartIndex++; - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 5)); - } - tStartIndex++; - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 23)); - } - tStartIndex++; - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 23)); - } - tStartIndex++; - break; - case 5: - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 5)); - } - tStartIndex++; - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 5)); - } - tStartIndex++; - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 5)); - } - tStartIndex++; - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 23)); - } - tStartIndex++; - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 23)); - } - tStartIndex++; - break; - case 6: - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 5)); - } - tStartIndex++; - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 5)); - } - tStartIndex++; - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 5)); - } - tStartIndex++; - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 23)); - } - tStartIndex++; - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 23)); - } - tStartIndex++; - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 23)); - } - tStartIndex++; - break; - case 7: - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, -4)); - } - tStartIndex++; - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, -4)); - } - tStartIndex++; - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, -4)); - } - tStartIndex++; - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 14)); - } - tStartIndex++; - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14)); - } - tStartIndex++; - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14)); - } - tStartIndex++; - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 32)); - } - tStartIndex++; - break; - case |
