diff options
Diffstat (limited to 'src/main/java/gregtech/api')
14 files changed, 345 insertions, 1818 deletions
diff --git a/src/main/java/gregtech/api/enums/MetaTileEntityIDs.java b/src/main/java/gregtech/api/enums/MetaTileEntityIDs.java index d13891f813..0222df057b 100644 --- a/src/main/java/gregtech/api/enums/MetaTileEntityIDs.java +++ b/src/main/java/gregtech/api/enums/MetaTileEntityIDs.java @@ -681,7 +681,12 @@ public enum MetaTileEntityIDs { RECIPE_FILTER_UHV(9339), INDUSTRIAL_APIARY(9399), Drone_Centre(9400), - DroneDownLink(9401); + DroneDownLink(9401), + sofc1(13101), + sofc2(13102), + tfft(13104), + lsc(13106), + tfftHatch(13109); public final int ID; 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 e7abfea98f..e3c3a8cbaa 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java @@ -1,1069 +1,8 @@ package gregtech.api.interfaces.internal; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; - -import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_RecipeBuilder; public interface IGT_RecipeAdder { - /** - * Adds a FusionreactorRecipe Does not work anymore! - */ - - @Deprecated - boolean addFusionReactorRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aFusionDurationInTicks, - int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion); - - /** - * Adds a FusionreactorRecipe - * - * @param aInput1 = first Input (not null, and respects StackSize) - * @param aInput2 = second Input (not null, and respects StackSize) - * @param aOutput1 = Output of the Fusion (can be null, and respects StackSize) - * @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. - */ - - @Deprecated - boolean addFusionReactorRecipe(FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, - int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion); - - /** - * Adds a Fusion Reactor Recipe - * - * @param FluidInputArray 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 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. - */ - - @Deprecated - boolean addFusionReactorRecipe(FluidStack[] FluidInputArray, FluidStack[] FluidOutputArray, - int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion); - - /** - * Adds a Centrifuge Recipe - * - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aOutput2 can be null - * @param aOutput3 can be null - * @param aOutput4 can be null - * @param aDuration must be > 0 - */ - - @Deprecated - boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, - ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration); - - @Deprecated - boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, - ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt); - - /** - * Adds a Centrifuge Recipe - * - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aOutput2 can be null - * @param aOutput3 can be null - * @param aOutput4 can be null - * @param aDuration must be > 0 - */ - @Deprecated - boolean addCentrifugeRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, - ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, - ItemStack aOutput6, int[] aChances, int aDuration, int aEUt); - - @Deprecated - boolean addCentrifugeRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, - ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, - ItemStack aOutput6, int[] aChances, int aDuration, int aEUt, boolean aCleanroom); - - /** - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aDuration must be > 0 - * @return if the recipe was successfully added - */ - - @Deprecated - boolean addCompressorRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt); - - /** - * Adds a Electrolyzer Recipe - * - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aOutput2 can be null - * @param aOutput3 can be null - * @param aOutput4 can be null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - @Deprecated - boolean addElectrolyzerRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, - ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt); - - /** - * Adds a Electrolyzer Recipe - * - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aOutput2 can be null - * @param aOutput3 can be null - * @param aOutput4 can be null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - @Deprecated - boolean addElectrolyzerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, - ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, - ItemStack aOutput6, int[] aChances, int aDuration, int aEUt); - - /** - * Adds a Chemical Recipe - * - * @param aInput1 must be != null - * @param aInput2 must be != null - * @param aOutput must be != null - * @param aDuration must be > 0 - */ - @Deprecated - boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int aDuration); - - @Deprecated - boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int aDuration, int aEUt); - - /** - * Adds a Chemical Recipe - * - * @param aInput1 must be != null - * @param aInput2 must be != null - * @param aOutput must be != null - * @param aDuration must be > 0 - */ - @Deprecated - boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, - ItemStack aOutput, int aDuration); - - /** - * Adds a Chemical Recipe Only use this when the recipe conflicts in MultiBlock! - * - * @param aInput1 must be != null - * @param aInput2 must be != null - * @param aOutput must be != null - * @param aOutput2 must be != null - * @param aDuration must be > 0 - */ - @Deprecated - boolean addChemicalRecipeForBasicMachineOnly(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, - FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick); - - /** - * Adds a Chemical Recipe - * - * @param aInput1 must be != null - * @param aInput2 must be != null - * @param aOutput must be != null - * @param aOutput2 must be != null - * @param aDuration must be > 0 - */ - @Deprecated - boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, - ItemStack aOutput, ItemStack aOutput2, int aDuration); - - /** - * Adds Recipes for creating a radically polymerized polymer from a base Material (for example Ethylene -> - * Polyethylene) - * - * @param aBasicMaterial The basic Material - * @param aBasicMaterialCell The corresponding Cell basic Material - * @param aPolymer The polymer - */ - void addDefaultPolymerizationRecipes(Fluid aBasicMaterial, ItemStack aBasicMaterialCell, Fluid aPolymer); - - /** - * Adds a Chemical Recipe - * - * @param aInput1 must be != null - * @param aInput2 must be != null - * @param aOutput must be != null - * @param aDuration must be > 0 - * @param aEUtick must be > 0 - */ - @Deprecated - boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, - ItemStack aOutput, int aDuration, int aEUtick); - - @Deprecated - boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, - ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick, boolean aCleanroom); - - /** - * Adds a Chemical Recipe - * - * @param aInput1 must be != null - * @param aInput2 must be != null - * @param aOutput must be != null - * @param aOutput2 must be != null - * @param aDuration must be > 0 - * @param aEUtick must be > 0 - */ - @Deprecated - boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, - ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick); - - /** - * Adds a Chemical Recipe that only exists in the Large Chemical Reactor - * - * @param aInputs item inputs - * @param aFluidInputs fluid inputs - * @param aFluidOutputs fluid outputs - * @param aOutputs item outputs - * @param aDuration must be > 0 - * @param aEUtick must be > 0 <br> - * aInputs and aFluidInputs must contain at least one valid input. <br> - * aOutputs and aFluidOutputs must contain at least one valid output. - * - */ - @Deprecated - boolean addMultiblockChemicalRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, - ItemStack[] aOutputs, int aDuration, int aEUtick); - - /** - * Adds a Blast Furnace Recipe - * - * @param aInput1 must be != null - * @param aInput2 can be null - * @param aOutput1 must be != null - * @param aOutput2 can be null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - * @param aLevel should be > 0 is the minimum Heat Level needed for this Recipe - */ - @Deprecated - boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aDuration, - int aEUt, int aLevel); - - /** - * Adds a Blast Furnace Recipe - * - * @param aInput1 must be != null - * @param aInput2 can be null - * @param aOutput1 must be != null - * @param aOutput2 can be null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - * @param aLevel should be > 0 is the minimum Heat Level needed for this Recipe - */ - @Deprecated - boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, - ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, int aLevel); - - @Deprecated - boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, - FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, - ItemStack aOutput4, int aDuration, int aEUt, int aLevel); - - /** - * Adds a Plasma Forge Recipe - * - * @param ItemInputArray Array of input items. - * @param FluidInputArray Array of output items. - * @param OutputItemArray Array of input fluids. - * @param FluidOutputArray Array of output items. - * @param aDuration Must be > 0. Duration in ticks. - * @param aEUt Should be > 0. EU/t. - * @param coil_heat_level Should be > 0. Heat of the coils used. - */ - @Deprecated - boolean addPlasmaForgeRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, ItemStack[] OutputItemArray, - FluidStack[] FluidOutputArray, int aDuration, int aEUt, int coil_heat_level); - - @Deprecated - boolean addPrimitiveBlastRecipe(ItemStack aInput1, ItemStack aInput2, int aCoalAmount, ItemStack aOutput1, - ItemStack aOutput2, int aDuration); - - /** - * Adds a Canning Machine Recipe - * - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aDuration must be > 0, 100 ticks is standard. - * @param aEUt should be > 0, 1 EU/t is standard. - */ - @Deprecated - boolean addCannerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aDuration, - int aEUt); - - /** - * Adds an Alloy Smelter Recipe - * - * @param aInput1 must be != null - * @param aInput2 can be null - * @param aOutput1 must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - @Deprecated - boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt); - - @Deprecated - boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt, - boolean hidden); - - /** - * Adds an Assembler Recipe - * - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aInput2 must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - @Deprecated - boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt); - - /** - * Adds an Assembler Recipe - * - * @param aInputs must be != null - * @param aOutput1 must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - * - */ - @Deprecated - boolean addAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, - int aEUt); - - /** - * Adds an Assembler Recipe - * - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - @Deprecated - boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, - int aDuration, int aEUt); - - @Deprecated - boolean addAssemblerRecipe(ItemStack aInput1, Object aOreDict, int aAmount, FluidStack aFluidInput, - ItemStack aOutput1, int aDuration, int aEUt); - - @Deprecated - boolean addAssemblerRecipe(ItemStack[] aInputs, Object aOreDict, int aAmount, FluidStack aFluidInput, - ItemStack aOutput1, int aDuration, int aEUt); - - @Deprecated - boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, - int aDuration, int aEUt, boolean aCleanroom); - - @Deprecated - boolean addAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt, - boolean aCleanroom); - - /** - * Adds an Circuit Assembler Recipe - * - * @param aInputs must be 1-6 ItemStacks - * @param aFluidInput 0-1 fluids - * @param aOutput must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - @Deprecated - boolean addCircuitAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, int aDuration, - int aEUt); - - @Deprecated - boolean addCircuitAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, int aDuration, - int aEUt, boolean aCleanroom); - - /** - * Adds an Assemblyline Recipe - * - * @param aInputs must be != null, 4-16 inputs - * @param aFluidInputs 0-4 fluids - * @param aOutput1 must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - @Deprecated - boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, - FluidStack[] aFluidInputs, ItemStack aOutput1, int aDuration, int aEUt); - - /** - * Adds a Assemblyline Recipe - * - * @param aInputs elements should be: ItemStack for single item; ItemStack[] for multiple equivalent items; - * {OreDict, amount} for oredict. - */ - @Deprecated - boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, Object[] aInputs, - FluidStack[] aFluidInputs, ItemStack aOutput1, int aDuration, int aEUt); - - /** - * Adds a Forge Hammer Recipe - * - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - @Deprecated - boolean addForgeHammerRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt); - - // Allows fluids as well as multiple items. - @Deprecated - boolean addForgeHammerRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, ItemStack[] ItemOutputArray, - FluidStack[] FluidOutputArray, int aDuration, int aEUt); - - /** - * Adds a Wiremill Recipe - * - * @param aInput must be != null - * @param aOutput must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - @Deprecated - boolean addWiremillRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt); - - @Deprecated - boolean addWiremillRecipe(ItemStack aInput, ItemStack aCircuit, ItemStack aOutput, int aDuration, int aEUt); - - /** - * Adds a Polariser Recipe - * - * @param aInput must be != null - * @param aOutput must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - @Deprecated - boolean addPolarizerRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt); - - /** - * Adds a Plate Bending Machine Recipe - * - * @param aInput must be != null - * @param aOutput must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - @Deprecated - boolean addBenderRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt); - - @Deprecated - boolean addBenderRecipe(ItemStack aInput, ItemStack aCircuit, ItemStack aOutput, int aDuration, int aEUt); - - /** - * Adds a Extruder Machine Recipe - * - * @param aInput must be != null - * @param aShape must be != null, Set the stackSize to 0 if you don't want to let it consume this Item. - * @param aOutput must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - @Deprecated - boolean addExtruderRecipe(ItemStack aInput, ItemStack aShape, ItemStack aOutput, int aDuration, int aEUt); - - /** - * Adds a Slicer Machine Recipe - * - * @param aInput must be != null - * @param aShape must be != null, Set the stackSize to 0 if you don't want to let it consume this Item. - * @param aOutput must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - @Deprecated - boolean addSlicerRecipe(ItemStack aInput, ItemStack aShape, ItemStack aOutput, int aDuration, int aEUt); - - /** - * @param aInput must be != null - * @param aFluidInput must be != null - * @param aOutput1 must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - * @return if the recipe was successfully added - */ - @Deprecated - boolean addOreWasherRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, - FluidStack aFluidInput, int aDuration, int aEUt); - - @Deprecated - boolean addOreWasherRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, - FluidStack aFluidInput, int[] aChances, int aDuration, int aEUt); - - /** - * Adds an Implosion Compressor Recipe - * - * @param aInput1 must be != null - * @param aInput2 amount of ITNT, should be > 0 - * @param aOutput1 must be != null - * @param aOutput2 can be null - */ - @Deprecated - boolean addImplosionRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2); - - /** - * Adds a Grinder Recipe - * - * @param aInput1 must be != null - * @param aInput2 id for the Cell needed for this Recipe - * @param aOutput1 must be != null - * @param aOutput2 can be null - * @param aOutput3 can be null - * @param aOutput4 can be null - */ - @Deprecated - boolean addGrinderRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, - ItemStack aOutput3, ItemStack aOutput4); - - /** - * Adds a Distillation Tower Recipe - * - * @param aInput must be != null - * @param aOutputs must be != null 1-5 Fluids - * @param aOutput2 can be null - */ - @Deprecated - boolean addDistillationTowerRecipe(FluidStack aInput, FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, - int aEUt); - - @Deprecated - boolean addDistillationTowerRecipe(FluidStack aInput, ItemStack[] aCircuit, FluidStack[] aOutputs, - ItemStack aOutput2, int aDuration, int aEUt); - - @Deprecated - boolean addSimpleArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, - int aDuration, int aEUt); - - @Deprecated - boolean addPlasmaArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, - int aDuration, int aEUt); - - @Deprecated - boolean addPlasmaArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, - FluidStack aFluidPutput, int[] aChances, int aDuration, int aEUt); - - /** - * Adds a Distillation Tower Recipe - */ - @Deprecated - boolean addDistillationRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, - ItemStack aOutput3, ItemStack aOutput4, int aDuration, int aEUt); - - /** - * Adds a Lathe Machine Recipe - */ - @Deprecated - boolean addLatheRecipe(ItemStack aInput1, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt); - - /** - * Adds a Cutter Recipe - */ - @Deprecated - boolean addCutterRecipe(ItemStack aInput, FluidStack aLubricant, ItemStack aOutput1, ItemStack aOutput2, - int aDuration, int aEUt); - - /** - * Adds Cutter Recipes with default Lubricants - */ - @Deprecated - boolean addCutterRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt); - - @Deprecated - boolean addCutterRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, - boolean aCleanroom); - - @Deprecated - boolean addCutterRecipe(ItemStack aInput, ItemStack aCircuit, ItemStack aOutput1, ItemStack aOutput2, int aDuration, - int aEUt); - - @Deprecated - boolean addCutterRecipe(ItemStack aInput, ItemStack aCircuit, ItemStack aOutput1, ItemStack aOutput2, int aDuration, - int aEUt, boolean aCleanroom); - - @Deprecated - boolean addCutterRecipe(ItemStack[] aInputs, ItemStack[] aOutputs, int aDuration, int aEUt, int aSpecial); - - @Deprecated - boolean addCutterRecipe(ItemStack[] aInputs, ItemStack[] aOutputs, int aDuration, int aEUt, boolean aCleanroom); - - /** - * Adds a Boxing Recipe - */ - @Deprecated - boolean addBoxingRecipe(ItemStack aContainedItem, ItemStack aEmptyBox, ItemStack aFullBox, int aDuration, int aEUt); - - /** - * @param aInput must be != null - * @param aOutput1 must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - * @return if the recipe was successfully added - */ - @Deprecated - boolean addThermalCentrifugeRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, - int aDuration, int aEUt); - - @Deprecated - boolean addThermalCentrifugeRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, - int[] aChances, int aDuration, int aEUt); - - /** - * Adds an Unboxing Recipe - */ - @Deprecated - boolean addUnboxingRecipe(ItemStack aFullBox, ItemStack aContainedItem, ItemStack aEmptyBox, int aDuration, - int aEUt); - - /** - * Adds a Vacuum Freezer Recipe - * - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aDuration must be > 0 - */ - @Deprecated - boolean addVacuumFreezerRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration); - - @Deprecated - boolean addVacuumFreezerRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt); - - @Deprecated - boolean addVacuumFreezerRecipe(FluidStack aInput1, FluidStack aOutput1, int aDuration, int aEUt); - - @Deprecated - boolean addVacuumFreezerRecipe(ItemStack[] aItemInput, FluidStack[] aFluidInput, ItemStack[] aItemOutput, - FluidStack[] aFluidOutput, int aDuration, int aEUt); - - /** - * Adds a Fuel for My Generators - * - * @param aInput1 must be != null - * @param aOutput1 can be null - * @param aEU EU per MilliBucket. If no Liquid Form of this Container is available, then it will give you - * EU*1000 per Item. - * @param aType 0 = Diesel; 1 = Gas Turbine; 2 = Thermal; 3 = Dense Fluid; 4 = Plasma; 5 = Magic; And if - * something is unclear or missing, then look at the GT_Recipe-Class - */ - @Deprecated - boolean addFuel(ItemStack aInput1, ItemStack aOutput1, int aEU, int aType); - - /** - * Adds an Amplifier Recipe for the Amplifabricator - */ - @Deprecated - boolean addAmplifier(ItemStack aAmplifierItem, int aDuration, int aAmplifierAmountOutputted); - - /** - * Adds a Recipe for the Brewing Machine (intentionally limited to Fluid IDs) - */ - @Deprecated - boolean addBrewingRecipe(ItemStack aIngredient, Fluid aInput, Fluid aOutput, boolean aHidden); - - @Deprecated - boolean addBrewingRecipe(ItemStack aIngredient, Fluid aInput, Fluid aOutput, int aDuration, int aEUt, - boolean aHidden); - - @Deprecated - boolean addBrewingRecipeCustom(ItemStack aIngredient, FluidStack aInput, FluidStack aOutput, int aDuration, - int aEUt, boolean aHidden); - - /** - * Adds a Recipe for the Fermenter - */ - @Deprecated - boolean addFermentingRecipe(FluidStack aInput, FluidStack aOutput, int aDuration, boolean aHidden); - - @Deprecated - boolean addFermentingRecipe(FluidStack aInput, FluidStack aOutput, int aDuration, int aEUT, boolean aHidden); - - /** - * Adds a Recipe for the Fluid Heater - */ - @Deprecated - boolean addFluidHeaterRecipe(ItemStack aCircuit, FluidStack aOutput, int aDuration, int aEUt); - - @Deprecated - boolean addFluidHeaterRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt); - - /** - * Adds a Recipe for the Distillery - */ - @Deprecated - boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, ItemStack aSolidOutput, - int aDuration, int aEUt, boolean aHidden); - - @Deprecated - boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, - boolean aHidden); - - @Deprecated - boolean addDistilleryRecipe(int circuitConfig, FluidStack aInput, FluidStack aOutput, ItemStack aSolidOutput, - int aDuration, int aEUt, boolean aHidden); - - @Deprecated - boolean addDistilleryRecipe(int aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, - boolean aHidden); - - /** - * Adds a Recipe for the Fluid Solidifier - */ - @Deprecated - boolean addFluidSolidifierRecipe(ItemStack aMold, FluidStack aInput, ItemStack aOutput, int aDuration, int aEUt); - - /** - * Adds a Recipe for the Fluid Solidifier - */ - @Deprecated - boolean addFluidSolidifierRecipe(final ItemStack[] itemInputs, final FluidStack[] fluidInputs, - final ItemStack[] itemOutputs, final FluidStack[] fluidOutputs, final int EUPerTick, - final int aDurationInTicks); - - /** - * Adds a Recipe for Fluid Smelting - */ - @Deprecated - boolean addFluidSmelterRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, - int aEUt); - - /** - * Adds a Recipe for Fluid Smelting - */ - @Deprecated - boolean addFluidSmelterRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, - int aEUt, boolean hidden); - - /** - * Adds a Recipe for Fluid Extraction - */ - @Deprecated - boolean addFluidExtractionRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, - int aDuration, int aEUt); - - /** - * Adds a Recipe for the Fluid Canner - */ - @Deprecated - boolean addFluidCannerRecipe(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput); - - @Deprecated - boolean addFluidCannerRecipe(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput, - int aDuration, int aEUt); - - /** - * Adds a Recipe for the Chemical Bath - */ - @Deprecated - boolean addChemicalBathRecipe(ItemStack aInput, FluidStack aBathingFluid, ItemStack aOutput1, ItemStack aOutput2, - ItemStack aOutput3, int[] aChances, int aDuration, int aEUt); - - @Deprecated - boolean addChemicalBathRecipe(ItemStack aInput, FluidStack aBathingFluid, FluidStack aFluidOutput, - ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt); - - /** - * Adds a Recipe for the Electromagnetic Separator - */ - @Deprecated - boolean addElectromagneticSeparatorRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, - ItemStack aOutput3, int[] aChances, int aDuration, int aEUt); - - /** - * Adds a Recipe for the Extractor - */ - @Deprecated - boolean addExtractorRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt); - - /** - * Adds a Recipe for the Printer - */ - @Deprecated - boolean addPrinterRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aSpecialSlot, ItemStack aOutput, - int aDuration, int aEUt); - - /** - * Adds a Recipe for the Autoclave - */ - @Deprecated - boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, - int aEUt); - - @Deprecated - boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, - int aEUt, boolean aCleanroom); - - @Deprecated - boolean addAutoclaveRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluid, ItemStack aOutput, int aChance, - int aDuration, int aEUt, boolean aCleanroom); - - @Deprecated - boolean addAutoclaveRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluidIn, FluidStack aFluidOut, - ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom); - - @Deprecated - boolean addAutoclaveSpaceRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, - int aEUt, boolean aCleanroom); - - @Deprecated - boolean addAutoclaveSpaceRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluid, ItemStack aOutput, - int aChance, int aDuration, int aEUt, boolean aCleanroom); - - @Deprecated - boolean addAutoclave4Recipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluidIn, FluidStack aFluidOut, - ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean aCleanroom); - - /** - * Adds a Recipe for the Mixer - */ - @Deprecated - boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, - FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt); - - @Deprecated - boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, - ItemStack aInput5, ItemStack aInput6, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, - int aDuration, int aEUt); - - @Deprecated - boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, - ItemStack aInput5, ItemStack aInput6, ItemStack aInput7, ItemStack aInput8, ItemStack aInput9, - FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt); - - @Deprecated - boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, - ItemStack aInput5, ItemStack aInput6, ItemStack aInput7, ItemStack aInput8, ItemStack aInput9, - FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, - ItemStack aOutput4, int aDuration, int aEUt); - - // Use me only from now on! - @Deprecated - boolean addMixerRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, ItemStack[] ItemOutputArray, - FluidStack[] FluidOutputArray, int aDuration, int aEUt); - - /** - * 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); - - /** - * Adds a Generalised Laser Engraver Recipe. - * - * @param ItemInputArray Array of input items. - * @param FluidInputArray Array of output items. - * @param OutputItemArray Array of input fluids. - * @param FluidOutputArray Array of output items. - * @param aDuration Must be > 0. Duration in ticks. - * @param aEUt Should be > 0. EU/t. - * @param aCleanroom Boolean for usage of cleanroom in recipe. - */ - @Deprecated - boolean addLaserEngraverRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, - ItemStack[] OutputItemArray, FluidStack[] FluidOutputArray, int aDuration, int aEUt, boolean aCleanroom); - - /** - * Adds a Recipe for the Forming Press - */ - @Deprecated - boolean addFormingPressRecipe(ItemStack aItemToImprint, ItemStack aForm, ItemStack aImprintedItem, int aDuration, - int aEUt); - - // Allows more than 2 inputs and multiple outputs - @Deprecated - boolean addFormingPressRecipe(ItemStack[] ItemInputArray, ItemStack[] OutputItemArray, int aDuration, int aEUt); - - /** - * Adds a Recipe for the Sifter. (up to 9 Outputs) - */ - @Deprecated - boolean addSifterRecipe(ItemStack aItemToSift, ItemStack[] aSiftedItems, int[] aChances, int aDuration, int aEUt); - - /** - * Adds a Generalised Sifter Recipe. - * - * @param ItemInputArray Array of input items. - * @param FluidInputArray Array of output items. - * @param OutputItemArray Array of input fluids. - * @param FluidOutputArray Array of output items. - * @param aChances Array of output chances. - * @param aDuration Must be > 0. Duration in ticks. - * @param aEUt Should be > 0. EU/t. - * @param aCleanroom Boolean for usage of cleanroom in recipe. - */ - @Deprecated - boolean addSifterRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, ItemStack[] OutputItemArray, - FluidStack[] FluidOutputArray, int[] aChances, int aDuration, int aEUt, boolean aCleanroom); - - /** - * Adds a Recipe for the Arc Furnace. (up to 4 Outputs) - */ - @Deprecated - boolean addArcFurnaceRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt); - - /** - * Adds a Recipe for the Arc Furnace. (up to 4 Outputs) - */ - @Deprecated - boolean addArcFurnaceRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, - boolean hidden); - - /** - * Adds a Recipe for the GT Pulveriser. (up to 4 Outputs) - */ - @Deprecated - boolean addPulveriserRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt); - - /** - * Adds a Recipe for the GT Pulveriser. (up to 4 Outputs) - */ - @Deprecated - boolean addPulveriserRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, - boolean hidden); - - /** - * Adds a Distillation Tower Recipe Every Fluid also gets separate distillation recipes - * - * @param aInput must be != null - * @param aOutputs must be != null 1-5 Fluids - * @param aOutput2 can be null - */ - @Deprecated - boolean addUniversalDistillationRecipe(FluidStack aInput, FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, - int aEUt); - - @Deprecated - boolean addUniversalDistillationRecipewithCircuit(FluidStack aInput, ItemStack[] aCircuit, FluidStack[] aOutputs, - ItemStack aOutput2, int aDuration, int aEUt); - - /** - * Adds Pyrolyse Recipe - * - * @param aInput input item stack - * @param aFluidInput fluid input - * @param intCircuit circuit index - * @param aOutput output item stack - * @param aFluidOutput fluid output - * @param aDuration recipe duration - * @param aEUt recipe EU/t expenditure - * - * @return if the recipe was successfully added - */ - @Deprecated - boolean addPyrolyseRecipe(ItemStack aInput, FluidStack aFluidInput, int intCircuit, ItemStack aOutput, - FluidStack aFluidOutput, int aDuration, int aEUt); - - /** - * Adds Oil Cracking Recipe - * - * @param aInput input item stack - * @param aOutput output item stack - * @param aDuration recipe duration - * @param aEUt recipe EU/t expenditure - */ - @Deprecated - boolean addCrackingRecipe(FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt); - - /** - * Adds Oil Cracking Recipe - * - * @param circuitConfig The circuit configuration to control cracking severity - * @param aInput The fluid to be cracked - * @param aInput2 The fluid to catalyze the cracking (typically Hydrogen or Steam) - * @param aOutput The cracked fluid - * @param aDuration recipe duration - * @param aEUt recipe EU/t expenditure - */ - @Deprecated - boolean addCrackingRecipe(int circuitConfig, FluidStack aInput, FluidStack aInput2, FluidStack aOutput, - int aDuration, int aEUt); - - /** - * Adds a Sound to the Sonictron9001 you should NOT call this in the preInit-Phase! - * - * @param aItemStack = The Item you want to display for this Sound - * @param aSoundName = The Name of the Sound in the resources/newsound-folder like Vanillasounds - * @return true if the Sound got added, otherwise false. - */ - @Deprecated - boolean addSonictronSound(ItemStack aItemStack, String aSoundName); - - @Deprecated - boolean addChemicalBathRecipe(ItemStack aInput, FluidStack aBathingFluid, ItemStack aOutput1, ItemStack aOutput2, - ItemStack aOutput3, FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt); - - /** - * Add a Nano Forge Recipe. The Nano Forge's main use is to make nanites/nanorobots. Tier 1 Nano Forge - Can make - * partly biological, partly metal nanites TIer 2 Nano Forge - Can make mostly metal nanites with some biological - * aspects TIer 3 Nano Forge - Can make nanites entierly out of metal - * - * @param aInputs must not be null - * @param aFluidInputs can be null - * @param aOutputs must not be null, the nanite or other output - * @param aFluidOutputs can be null - * @param aChances can be null - * @param aDuration recipe duration - * @param aEUt recipe EU/t expenditure - * @param aSpecialValue defines the tier of nano forge required. - * - */ - @Deprecated - boolean addNanoForgeRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack[] aOutputs, - FluidStack[] aFluidOutputs, int[] aChances, int aDuration, int aEUt, int aSpecialValue); - - /** - * Add a breeder cell. - * - * @param input raw stack. should be undamaged. - * @param output breed output - * @param heatMultiplier bonus progress per neutron pulse per heat step - * @param heatStep divisor for hull heat - * @param reflector true if also acts as a neutron reflector, false otherwise. - * @param requiredPulses progress required to complete breeding - * @return added fake recipe - */ - GT_Recipe addIC2ReactorBreederCell(ItemStack input, ItemStack output, boolean reflector, int heatStep, - int heatMultiplier, int requiredPulses); - - /** - * Add a fuel cell. - * - * @param input raw stack. should be undamaged. - * @param output depleted stack - * @param aMox true if has mox behavior, false if uranium behavior. - * @param aHeat inherent heat output multiplier of the fuel material. should not add the extra heat from being a - * multi-cell! - * @param aEnergy inherent energy output multiplier of the fuel material. should not add the extra energy from being - * a multi-cell! - * @param aCells cell count - * @return added fake recipe - */ - GT_Recipe addIC2ReactorFuelCell(ItemStack input, ItemStack output, boolean aMox, float aHeat, float aEnergy, - int aCells); - GT_RecipeBuilder stdBuilder(); } diff --git a/src/main/java/gregtech/api/items/GT_BreederCell_Item.java b/src/main/java/gregtech/api/items/GT_BreederCell_Item.java index 3d51415783..438b0f467e 100644 --- a/src/main/java/gregtech/api/items/GT_BreederCell_Item.java +++ b/src/main/java/gregtech/api/items/GT_BreederCell_Item.java @@ -14,6 +14,7 @@ import net.minecraft.world.World; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; +import gregtech.api.recipe.RecipeMaps; import gregtech.api.util.GT_Utility; import ic2.api.reactor.IReactor; import ic2.api.reactor.IReactorComponent; @@ -43,13 +44,18 @@ public class GT_BreederCell_Item extends GT_Generic_Item implements IReactorComp GregTech_API.sAfterGTPostload.add(() -> { mProduct = aProduct.get(); if (!hidden && !neiAdded) { - GT_Values.RA.addIC2ReactorBreederCell( - new ItemStack(this), - mProduct, - deflector, - mHeatBonusStep, - mHeatBonusMultiplier, - getMaxDamage()); + GT_Values.RA.stdBuilder() + .itemInputs(new ItemStack(this)) + .itemOutputs(mProduct) + .setNEIDesc( + deflector ? "Neutron reflecting Breeder" : "Heat neutral Breeder", + String.format("Every %d reactor hull heat", mHeatBonusStep), + String.format("increase speed by %d00%%", mHeatBonusMultiplier), + String.format("Required pulses: %d", getMaxDamage())) + .duration(0) + .eut(0) + .addTo(RecipeMaps.ic2NuclearFakeRecipes); + neiAdded = true; } }); diff --git a/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java b/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java index 8698bac886..2509cf6261 100644 --- a/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java +++ b/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java @@ -8,10 +8,13 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; import gregtech.api.enums.GT_Values; +import gregtech.api.recipe.RecipeMaps; import gregtech.api.util.GT_Utility; import ic2.api.reactor.IReactor; import ic2.api.reactor.IReactorComponent; import ic2.core.IC2Potion; +import ic2.core.init.MainConfig; +import ic2.core.util.ConfigUtil; public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implements IReactorComponent { @@ -36,13 +39,33 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement this.sMox = aMox; if (aDepleted != null && aEnergy > 0 && aHeat > 0) { // avoid adding depleted cells to recipe map - GT_Values.RA.addIC2ReactorFuelCell( - new ItemStack(this), - aDepleted, - aMox, - aHeat * MYSTERIOUS_MULTIPLIER_HEAT, - aEnergy, - aCellcount); + + int pulses = aCellcount / 2 + 1; + + // for the mysterious constant 5.0f, + // see ic2.core.block.reactor.tileentity.TileEntityNuclearReactorElectric.getOfferedEnergy + // don't ask, just accept + float nukePowerMult = 5.0f * ConfigUtil.getFloat(MainConfig.get(), "balance/energy/generator/nuclear"); + GT_Values.RA.stdBuilder() + .itemInputs(new ItemStack(this)) + .itemOutputs(aDepleted) + .setNEIDesc( + aMox ? "MOX Model" : "Uranium Model", + "Neutron Pulse: " + aCellcount, + aCellcount == 1 + ? String.format("Heat: %.1f * n1 * (n1 + 1)", (aHeat * MYSTERIOUS_MULTIPLIER_HEAT) / 2f) + : String.format( + "Heat: %.1f * (%d + n1) * (%d + n1)", + (aHeat * MYSTERIOUS_MULTIPLIER_HEAT) * aCellcount / 2f, + aCellcount, + aCellcount + 1), + String.format( + "Energy: %.1f + n2 * %.1f EU/t", + aEnergy * aCellcount * pulses * nukePowerMult, + aEnergy * nukePowerMult)) + .duration(0) + .eut(0) + .addTo(RecipeMaps.ic2NuclearFakeRecipes); } } diff --git a/src/main/java/gregtech/api/recipe/RecipeMap.java b/src/main/java/gregtech/api/recipe/RecipeMap.java index 2ee2d3cb94..70a5fcf3ba 100644 --- a/src/main/java/gregtech/api/recipe/RecipeMap.java +++ b/src/main/java/gregtech/api/recipe/RecipeMap.java @@ -112,68 +112,13 @@ public final class RecipeMap<B extends RecipeMapBackend> implements IRecipeMap { } // region add recipe - - @Nullable - public GT_Recipe addRecipe(boolean aOptimize, @Nullable ItemStack[] aInputs, @Nullable ItemStack[] aOutputs, - @Nullable Object aSpecial, @Nullable int[] aOutputChances, @Nullable FluidStack[] aFluidInputs, - @Nullable FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { - return addRecipe( - new GT_Recipe( - aOptimize, - aInputs, - aOutputs, - aSpecial, - aOutputChances, - aFluidInputs, - aFluidOutputs, - aDuration, - aEUt, - aSpecialValue)); - } - - @Nullable - public GT_Recipe addRecipe(@Nullable int[] aOutputChances, @Nullable FluidStack[] aFluidInputs, - @Nullable FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { - return addRecipe( - new GT_Recipe( - false, - null, - null, - null, - aOutputChances, - aFluidInputs, - aFluidOutputs, - aDuration, - aEUt, - aSpecialValue), - false, - false, - false); - } - - @Nullable - public GT_Recipe addRecipe(boolean aOptimize, @Nullable ItemStack[] aInputs, @Nullable ItemStack[] aOutputs, - @Nullable Object aSpecial, @Nullable FluidStack[] aFluidInputs, @Nullable FluidStack[] aFluidOutputs, - int aDuration, int aEUt, int aSpecialValue) { - return addRecipe( - new GT_Recipe( - aOptimize, - aInputs, - aOutputs, - aSpecial, - null, - aFluidInputs, - aFluidOutputs, - aDuration, - aEUt, - aSpecialValue)); - } - + @Deprecated @Nullable public GT_Recipe addRecipe(GT_Recipe aRecipe) { return addRecipe(aRecipe, true, false, false); } + @Deprecated @Nullable public GT_Recipe addRecipe(GT_Recipe aRecipe, boolean aCheckForCollisions, boolean aFakeRecipe, boolean aHidden) { aRecipe.mHidden = aHidden; @@ -188,30 +133,7 @@ public final class RecipeMap<B extends RecipeMapBackend> implements IRecipeMap { * Only used for fake Recipe Handlers to show something in NEI, do not use this for adding actual Recipes! * findRecipe won't find fake Recipes, containsInput WILL find fake Recipes */ - @Nullable - public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, @Nullable ItemStack[] aInputs, - @Nullable ItemStack[] aOutputs, @Nullable Object aSpecial, @Nullable int[] aOutputChances, - @Nullable FluidStack[] aFluidInputs, @Nullable FluidStack[] aFluidOutputs, int aDuration, int aEUt, - int aSpecialValue) { - return addFakeRecipe( - aCheckForCollisions, - new GT_Recipe( - false, - aInputs, - aOutputs, - aSpecial, - aOutputChances, - aFluidInputs, - aFluidOutputs, - aDuration, - aEUt, - aSpecialValue)); - } - - /** - * Only used for fake Recipe Handlers to show something in NEI, do not use this for adding actual Recipes! - * findRecipe won't find fake Recipes, containsInput WILL find fake Recipes - */ + @Deprecated @Nullable public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, @Nullable ItemStack[] aInputs, @Nullable ItemStack[] aOutputs, @Nullable Object aSpecial, @Nullable FluidStack[] aFluidInputs, @@ -231,26 +153,7 @@ public final class RecipeMap<B extends RecipeMapBackend> implements IRecipeMap { aSpecialValue)); } - @Nullable - public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, @Nullable ItemStack[] aInputs, - @Nullable ItemStack[] aOutputs, @Nullable Object aSpecial, @Nullable FluidStack[] aFluidInputs, - @Nullable FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue, boolean hidden) { - return addFakeRecipe( - aCheckForCollisions, - new GT_Recipe( - false, - aInputs, - aOutputs, - aSpecial, - null, - aFluidInputs, - aFluidOutputs, - aDuration, - aEUt, - aSpecialValue), - hidden); - } - + @Deprecated @Nullable public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, @Nullable ItemStack[] aInputs, @Nullable ItemStack[] aOutputs, @Nullable Object aSpecial, @Nullable FluidStack[] aFluidInputs, @@ -277,11 +180,13 @@ public final class RecipeMap<B extends RecipeMapBackend> implements IRecipeMap { * Only used for fake Recipe Handlers to show something in NEI, do not use this for adding actual Recipes! * findRecipe won't find fake Recipes, containsInput WILL find fake Recipes */ + @Deprecated @Nullable public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, GT_Recipe aRecipe) { return addRecipe(aRecipe, aCheckForCollisions, true, false); } + @Deprecated @Nullable public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, GT_Recipe aRecipe, boolean hidden) { return addRecipe(aRecipe, aCheckForCollisions, true, hidden); diff --git a/src/main/java/gregtech/api/recipe/RecipeMaps.java b/src/main/java/gregtech/api/recipe/RecipeMaps.java index 409703fbad..c42b8725b4 100644 --- a/src/main/java/gregtech/api/recipe/RecipeMaps.java +++ b/src/main/java/gregtech/api/recipe/RecipeMaps.java @@ -1103,11 +1103,6 @@ public final class RecipeMaps { .maxIO(1, 1, 0, 0) .neiSpecialInfoFormatter(FuelSpecialValueFormatter.INSTANCE) .build(); - public static final RecipeMap<FuelBackend> fluidNaquadahReactorFuels = RecipeMapBuilder - .of("gt.recipe.fluidfuelnaquadahreactor", FuelBackend::new) - .maxIO(1, 1, 0, 0) - .neiSpecialInfoFormatter(FuelSpecialValueFormatter.INSTANCE) - .build(); public static final RecipeMap<RecipeMapBackend> electrolyzerNonCellRecipes = RecipeMapBuilder .of("gt.recipe.largeelectrolyzer") .maxIO(1, 6, 1, 6) diff --git a/src/main/java/gregtech/api/util/FishPondFakeRecipe.java b/src/main/java/gregtech/api/util/FishPondFakeRecipe.java index dc579ebd9b..b5bfff9e29 100644 --- a/src/main/java/gregtech/api/util/FishPondFakeRecipe.java +++ b/src/main/java/gregtech/api/util/FishPondFakeRecipe.java @@ -1,16 +1,17 @@ package gregtech.api.util; +import static gregtech.api.util.GT_RecipeBuilder.SECONDS; +import static gtPlusPlus.api.recipe.GTPPRecipeMaps.fishPondRecipes; + import java.util.ArrayList; import net.minecraft.item.ItemStack; import net.minecraft.util.WeightedRandomFishable; import net.minecraftforge.common.FishingHooks; -import net.minecraftforge.fluids.FluidStack; +import gregtech.api.enums.GT_Values; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.recipe.GTPPRecipeMaps; -import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.reflect.ReflectionUtils; @@ -49,7 +50,14 @@ public class FishPondFakeRecipe { ItemStack t = (ItemStack) ReflectionUtils .getField(WeightedRandomFishable.class, "field_150711_b") .get(u); - addNewFishPondLoot(mType, new ItemStack[] { t }, new int[] { 10000 }); + GT_Values.RA.stdBuilder() + .itemInputs(GT_Utility.getIntegratedCircuit(mType)) + .itemOutputs(t) + .duration(5 * SECONDS) + .eut(0) + .ignoreCollision() + .addTo(fishPondRecipes); + Logger.INFO("Fishing [" + mType + "]: " + ItemUtils.getArrayStackNames(new ItemStack[] { t })); } catch (IllegalArgumentException | IllegalAccessException e1) { Logger.INFO("Error generating Fish Pond Recipes. [2]"); e1.printStackTrace(); @@ -61,20 +69,4 @@ public class FishPondFakeRecipe { return true; } - - public static void addNewFishPondLoot(int circuit, ItemStack[] outputItems, int[] chances) { - GT_Recipe x = new GT_Recipe( - true, - new ItemStack[] { CI.getNumberedCircuit(circuit) }, - outputItems, - null, - chances, - new FluidStack[] { null }, - new FluidStack[] { null }, - 100, // 1 Tick - 0, // No Eu produced - 0); - Logger.INFO("Fishing [" + circuit + "]: " + ItemUtils.getArrayStackNames(outputItems)); - GTPPRecipeMaps.fishPondRecipes.addRecipe(x, false, false, false); - } } diff --git a/src/main/java/gregtech/api/util/GT_Forestry_Compat.java b/src/main/java/gregtech/api/util/GT_Forestry_Compat.java index 427703e6f7..d383d643d7 100644 --- a/src/main/java/gregtech/api/util/GT_Forestry_Compat.java +++ b/src/main/java/gregtech/api/util/GT_Forestry_Compat.java @@ -1,9 +1,14 @@ package gregtech.api.util; +import static gregtech.api.recipe.RecipeMaps.centrifugeNonCellRecipes; +import static gregtech.api.recipe.RecipeMaps.centrifugeRecipes; +import static gregtech.api.recipe.RecipeMaps.scannerFakeRecipes; +import static gregtech.api.util.GT_RecipeBuilder.SECONDS; +import static gregtech.api.util.GT_RecipeBuilder.TICKS; + import java.util.Map; import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; import forestry.api.recipes.ICentrifugeRecipe; import forestry.api.recipes.ISqueezerRecipe; @@ -17,112 +22,112 @@ public class GT_Forestry_Compat { public static void populateFakeNeiRecipes() { if (ItemList.FR_Bee_Drone.get(1L) != null) { - RecipeMaps.scannerFakeRecipes.addFakeRecipe( - false, - new ItemStack[] { ItemList.FR_Bee_Drone.getWildcard(1L) }, - new ItemStack[] { ItemList.FR_Bee_Drone.getWithName(1L, "Scanned Drone") }, - null, - new FluidStack[] { Materials.Honey.getFluid(100L) }, - null, - 500, - 2, - 0); + GT_Values.RA.stdBuilder() + .itemInputs(ItemList.FR_Bee_Drone.getWildcard(1L)) + .itemOutputs(ItemList.FR_Bee_Drone.getWithName(1L, "Scanned Drone")) + .fluidInputs(Materials.Honey.getFluid(100L)) + .duration(25 * SECONDS) + .eut(2) + .noOptimize() + .ignoreCollision() + .fake() + .addTo(scannerFakeRecipes); } if (ItemList.FR_Bee_Princess.get(1L) != null) { - RecipeMaps.scannerFakeRecipes.addFakeRecipe( - false, - new ItemStack[] { ItemList.FR_Bee_Princess.getWildcard(1L) }, - new ItemStack[] { ItemList.FR_Bee_Princess.getWithName(1L, "Scanned Princess") }, - null, - new FluidStack[] { Materials.Honey.getFluid(100L) }, - null, - 500, - 2, - 0); + GT_Values.RA.stdBuilder() + .itemInputs(ItemList.FR_Bee_Princess.getWildcard(1L)) + .itemOutputs(ItemList.FR_Bee_Princess.getWithName(1L, "Scanned Princess")) + .fluidInputs(Materials.Honey.getFluid(100L)) + .duration(25 * SECONDS) + .eut(2) + .noOptimize() + .ignoreCollision() + .fake() + .addTo(scannerFakeRecipes); } if (ItemList.FR_Bee_Queen.get(1L) != null) { - RecipeMaps.scannerFakeRecipes.addFakeRecipe( - false, - new ItemStack[] { ItemList.FR_Bee_Queen.getWildcard(1L) }, - new ItemStack[] { ItemList.FR_Bee_Queen.getWithName(1L, "Scanned Queen") }, - null, - new FluidStack[] { Materials.Honey.getFluid(100L) }, - null, - 500, - 2, - 0); + GT_Values.RA.stdBuilder() + .itemInputs(ItemList.FR_Bee_Queen.getWildcard(1L)) + .itemOutputs(ItemList.FR_Bee_Queen.getWithName(1L, "Scanned Queen")) + .fluidInputs(Materials.Honey.getFluid(100L)) + .duration(25 * SECONDS) + .eut(2) + .noOptimize() + .ignoreCollision() + .fake() + .addTo(scannerFakeRecipes); } if (ItemList.FR_Tree_Sapling.get(1L) != null) { - RecipeMaps.scannerFakeRecipes.addFakeRecipe( - false, - new ItemStack[] { ItemList.FR_Tree_Sapling.getWildcard(1L) }, - new ItemStack[] { ItemList.FR_Tree_Sapling.getWithName(1L, "Scanned Sapling") }, - null, - new FluidStack[] { Materials.Honey.getFluid(100L) }, - null, - 500, - 2, - 0); + GT_Values.RA.stdBuilder() + .itemInputs(ItemList.FR_Tree_Sapling.getWildcard(1L)) + .itemOutputs(ItemList.FR_Tree_Sapling.getWithName(1L, "Scanned Sapling")) + .fluidInputs(Materials.Honey.getFluid(100L)) + .duration(25 * SECONDS) + .eut(2) + .noOptimize() + .ignoreCollision() + .fake() + .addTo(scannerFakeRecipes); } if (ItemList.FR_Butterfly.get(1L) != null) { - RecipeMaps.scannerFakeRecipes.addFakeRecipe( - false, - new ItemStack[] { ItemList.FR_Butterfly.getWildcard(1L) }, - new ItemStack[] { ItemList.FR_Butterfly.getWithName(1L, "Scanned Butterfly") }, - null, - new FluidStack[] { Materials.Honey.getFluid(100L) }, - null, - 500, - 2, - 0); + GT_Values.RA.stdBuilder() + .itemInputs(ItemList.FR_Butterfly.getWildcard(1L)) + .itemOutputs(ItemList.FR_Butterfly.getWithName(1L, "Scanned Butterfly")) + .fluidInputs(Materials.Honey.getFluid(100L)) + .duration(25 * SECONDS) + .eut(2) + .noOptimize() + .ignoreCollision() + .fake() + .addTo(scannerFakeRecipes); } if (ItemList.FR_Larvae.get(1L) != null) { - RecipeMaps.scannerFakeRecipes.addFakeRecipe( - false, - new ItemStack[] { ItemList.FR_Larvae.getWildcard(1L) }, - new ItemStack[] { ItemList.FR_Larvae.getWithName(1L, "Scanned Larvae") }, - null, - new FluidStack[] { Materials.Honey.getFluid(100L) }, - null, - 500, - 2, - 0); + GT_Values.RA.stdBuilder() + .itemInputs(ItemList.FR_Larvae.getWildcard(1L)) + .itemOutputs(ItemList.FR_Larvae.getWithName(1L, "Scanned Larvae")) + .fluidInputs(Materials.Honey.getFluid(100L)) + .duration(25 * SECONDS) + .eut(2) + .noOptimize() + .ignoreCollision() + .fake() + .addTo(scannerFakeRecipes); } if (ItemList.FR_Serum.get(1L) != null) { - RecipeMaps.scannerFakeRecipes.addFakeRecipe( - false, - new ItemStack[] { ItemList.FR_Serum.getWildcard(1L) }, - new ItemStack[] { ItemList.FR_Serum.getWithName(1L, "Scanned Serum") }, - null, - new FluidStack[] { Materials.Honey.getFluid(100L) }, - null, - 500, - 2, - 0); + GT_Values.RA.stdBuilder() + .itemInputs(ItemList.FR_Serum.getWildcard(1L)) + .itemOutputs(ItemList.FR_Serum.getWithName(1L, "Scanned Serum")) + .fluidInputs(Materials.Honey.getFluid(100L)) + .duration(25 * SECONDS) + .eut(2) + .noOptimize() + .ignoreCollision() + .fake() + .addTo(scannerFakeRecipes); } if (ItemList.FR_Caterpillar.get(1L) != null) { - RecipeMaps.scannerFakeRecipes.addFakeRecipe( - false, - new ItemStack[] { ItemList.FR_Caterpillar.getWildcard(1L) }, - new ItemStack[] { ItemList.FR_Caterpillar.getWithName(1L, "Scanned Caterpillar") }, - null, - new FluidStack[] { Materials.Honey.getFluid(100L) }, - null, - 500, - 2, - 0); + GT_Values.RA.stdBuilder() + .itemInputs(ItemList.FR_Caterpillar.getWildcard(1L)) + .itemOutputs(ItemList.FR_Caterpillar.getWithName(1L, "Scanned Caterpillar")) + .fluidInputs(Materials.Honey.getFluid(100L)) + .duration(25 * SECONDS) + .eut(2) + .noOptimize() + .ignoreCollision() + .fake() + .addTo(scannerFakeRecipes); } if (ItemList.FR_PollenFertile.get(1L) != null) { - RecipeMaps.scannerFakeRecipes.addFakeRecipe( - false, - new ItemStack[] { ItemList.FR_PollenFertile.getWildcard(1L) }, - new ItemStack[] { ItemList.FR_PollenFertile.getWithName(1L, "Scanned Pollen") }, - null, - new FluidStack[] { Materials.Honey.getFluid(100L) }, - null, - 500, - 2, - 0); + GT_Values.RA.stdBuilder() + .itemInputs(ItemList.FR_PollenFertile.getWildcard(1L)) + .itemOutputs(ItemList.FR_PollenFertile.getWithName(1L, "Scanned Pollen")) + .fluidInputs(Materials.Honey.getFluid(100L)) + .duration(25 * SECONDS) + .eut(2) + .noOptimize() + .ignoreCollision() + .fake() + .addTo(scannerFakeRecipes); } } @@ -139,28 +144,21 @@ public class GT_Forestry_Compat { .copy(); i++; } - RecipeMaps.centrifugeRecipes.addRecipe( - true, - new ItemStack[] { tRecipe.getInput() }, - tOutputs, - null, - tChances, - null, - null, - 128, - 5, - 0); - RecipeMaps.centrifugeNonCellRecipes.addRecipe( - true, - new ItemStack[] { tRecipe.getInput() }, - tOutputs, - null, - tChances, - null, - null, - 128, - 5, - 0); + GT_Values.RA.stdBuilder() + .itemInputs(tRecipe.getInput()) + .itemOutputs(tOutputs) + .outputChances(tChances) + .duration(6 * SECONDS + 8 * TICKS) + .eut(5) + .addTo(centrifugeRecipes); + + GT_Values.RA.stdBuilder() + .itemInputs(tRecipe.getInput()) + .itemOutputs(tOutputs) + .outputChances(tChances) + .duration(6 * SECONDS + 8 * TICKS) + .eut(5) + .addTo(centrifugeNonCellRecipes); } } catch (Throwable e) { if (GT_Values.D1) { @@ -172,18 +170,17 @@ public class GT_Forestry_Compat { public static void transferSqueezerRecipes() { try { for (ISqueezerRecipe tRecipe : RecipeManagers.squeezerManager.recipes()) { - if ((tRecipe.getResources().length == 1) && (tRecipe.getFluidOutput() != null)) { - RecipeMaps.fluidExtractionRecipes.addRecipe( - true, - new ItemStack[] { tRecipe.getResources()[0] }, - new ItemStack[] { tRecipe.getRemnants() }, - null, - new int[] { (int) (tRecipe.getRemnantsChance() * 10000) }, - null, - new FluidStack[] { tRecipe.getFluidOutput() }, - 32, - 8, - 0); + if ((tRecipe.getResources().length == 1) && (tRecipe.getFluidOutput() != null) + && (tRecipe.getResources()[0] != null) + && (tRecipe.getRemnants() != null)) { + GT_Values.RA.stdBuilder() + .itemInputs(tRecipe.getResources()[0]) + .itemOutputs(tRecipe.getRemnants()) + .outputChances((int) (tRecipe.getRemnantsChance() * 10000)) + .fluidOutputs(tRecipe.getFluidOutput()) + .duration(1 * SECONDS + 12 * TICKS) + .eut(8) + .addTo(RecipeMaps.fluidExtractionRecipes); } } } catch (Throwable e) { diff --git a/src/main/java/gregtech/api/util/GT_ModHandler.java b/src/main/java/gregtech/api/util/GT_ModHandler.java index 70dc2f30b0..8c43a5334b 100644 --- a/src/main/java/gregtech/api/util/GT_ModHandler.java +++ b/src/main/java/gregtech/api/util/GT_ModHandler.java @@ -10,7 +10,6 @@ import static gregtech.api.enums.GT_Values.RA; import static gregtech.api.enums.GT_Values.V; import static gregtech.api.enums.GT_Values.W; import static gregtech.api.recipe.RecipeMaps.alloySmelterRecipes; -import static gregtech.api.recipe.RecipeMaps.extractorRecipes; import static gregtech.api.recipe.RecipeMaps.oreWasherRecipes; import static gregtech.api.util.GT_RecipeBuilder.SECONDS; import static gregtech.api.util.GT_RecipeBuilder.TICKS; @@ -576,184 +575,6 @@ public class GT_ModHandler { } /** - * LiquidTransposer Recipe for both directions - */ - @Deprecated - public static boolean addLiquidTransposerRecipe(ItemStack aEmptyContainer, FluidStack aLiquid, - ItemStack aFullContainer, int aMJ) { - return true; - } - - /** - * LiquidTransposer Recipe for filling Containers - */ - @Deprecated - public static boolean addLiquidTransposerFillRecipe(ItemStack aEmptyContainer, FluidStack aLiquid, - ItemStack aFullContainer, int aMJ) { - return true; - } - - /** - * LiquidTransposer Recipe for emptying Containers - */ - @Deprecated - public static boolean addLiquidTransposerEmptyRecipe(ItemStack aFullContainer, FluidStack aLiquid, - ItemStack aEmptyContainer, int aMJ) { - return true; - } - - /** - * IC2-Extractor Recipe. Overloads old Recipes automatically - */ - @Deprecated - public static boolean addExtractionRecipe(ItemStack aInput, ItemStack aOutput) { - aOutput = GT_OreDictUnificator.get(true, aOutput); - if (aInput == null || aOutput == null) return false; - RA.stdBuilder() - .itemInputs(aInput) - .itemOutputs(aOutput) - .duration(15 * SECONDS) - .eut(2) - .addTo(extractorRecipes); - return true; - } - - /** - * RC-BlastFurnace Recipes - */ - @Deprecated - public static boolean addRCBlastFurnaceRecipe(ItemStack aInput, ItemStack aOutput, int aTime) { - return true; - } - - @Deprecated - public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1) { - return addPulverisationRecipe(aInput, aOutput1, null, 0, false); - } - - @Deprecated - public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2) { - return addPulverisationRecipe(aInput, aOutput1, aOutput2, 100, false); - } - - @Deprecated - public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, - int aChance) { - return addPulverisationRecipe(aInput, aOutput1, aOutput2, aChance, false); - } - - @Deprecated - public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, boolean aOverwrite) { - return addPulverisationRecipe(aInput, aOutput1, null, 0, aOverwrite); - } - - @Deprecated - public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, - boolean aOverwrite) { - return addPulverisationRecipe(aInput, aOutput1, aOutput2, 100, aOverwrite); - } - - @Deprecated - public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aChance, - boolean aOverwrite) { - return addPulverisationRecipe(aInput, aOutput1, aOutput2, aChance, null, 0, aOverwrite); - } - - /** - * Adds Several Pulverizer-Type Recipes. - */ - @Deprecated - public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aChance2, - ItemStack aOutput3, int aChance3, boolean aOverwrite) { - aOutput1 = GT_OreDictUnificator.get(true, aOutput1); - aOutput2 = GT_OreDictUnificator.get(true, aOutput2); - if (GT_Utility.isStackInvalid(aInput) || GT_Utility.isStackInvalid(aOutput1)) return false; - - if (GT_Utility.getContainerItem(aInput, false) == null) { - RA.addPulveriserRecipe( - aInput, - new ItemStack[] { aOutput1, aOutput2, aOutput3 }, - new int[] { 10000, aChance2 <= 0 ? 1000 : 100 * aChance2, aChance3 <= 0 ? 1000 : 100 * aChance3 }, - 400, - 2); - } - return true; - } - - @Deprecated - public static boolean addPulverisationRecipe(ItemStack aInputItem, ItemStack[] aOutputArray, int[] aChanceArray, - int aEUt, int aRecipeDurationInTicks) { - - ItemStack[] aUnifiedOutputArray = new ItemStack[aOutputArray.length]; - int counter = 0; - - for (ItemStack item : aOutputArray) { - aUnifiedOutputArray[counter] = GT_OreDictUnificator.get(true, item); - counter++; - } - - RA.addPulveriserRecipe(aInputItem, aOutputArray, aChanceArray, aRecipeDurationInTicks, aEUt); - - return true; - } - - @Deprecated - public static boolean addImmersiveEngineeringRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, - int aChance2, ItemStack aOutput3, int aChance3) { - return true; - } - - @Deprecated - public static boolean addMagneticraftRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aChance2, - ItemStack aOutput3, int aChance3) { - return true; - } - - /** - * Adds a Recipe to the Sawmills of ThermalCraft - */ - @Deprecated - public static boolean addSawmillRecipe(ItemStack aInput1, ItemStack aOutput1, ItemStack aOutput2) { - return true; - } - - /** - * Induction Smelter Recipes and Alloy Smelter Recipes - */ - @Deprecated - public static boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, - int aEUt, boolean aAllowSecondaryInputEmpty) { - if (aInput1 == null || (aInput2 == null && !aAllowSecondaryInputEmpty) || aOutput1 == null) return false; - aOutput1 = GT_OreDictUnificator.get(true, aOutput1); - RA.stdBuilder() - .itemInputs(aInput1, aInput2) - .itemOutputs(aOutput1) - .duration(aDuration) - .eut(aEUt) - .addTo(alloySmelterRecipes); - return true; - } - - /** - * Induction Smelter Recipes for TE - */ - public static boolean addInductionSmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, - ItemStack aOutput2, int aEnergy, int aChance) { - return true; - } - - /** - * Smelts Ores to Ingots - */ - public static boolean addOreToIngotSmeltingRecipe(ItemStack aInput, ItemStack aOutput) { - aOutput = GT_OreDictUnificator.get(true, aOutput); - if (aInput == null || aOutput == null) return false; - FurnaceRecipes.smelting() - .func_151394_a(aInput, GT_Utility.copyOrNull(aOutput), 0.0F); - return true; - } - - /** * Adds GT versions of the IC2 recipes from the supplied IC2RecipeList. */ public static void addIC2RecipesToGT(Map<IRecipeInput, RecipeOutput> aIC2RecipeList, RecipeMap<?> aGTRecipeMap, @@ -781,35 +602,27 @@ public class GT_ModHandler { .contains("ic2.itemPurifiedCrushed")))) continue; switch (aGTRecipeMap.unlocalizedName) { - case "gt.recipe.macerator", "gt.recipe.extractor", "gt.recipe.compressor" -> aGTRecipeMap - .addRecipe( - true, - new ItemStack[] { GT_Utility.copyAmount( + case "gt.recipe.macerator", "gt.recipe.extractor", "gt.recipe.compressor" -> GT_Values.RA + .stdBuilder() + .itemInputs( + GT_Utility.copyAmount( iRecipeInputRecipeOutputEntry.getKey() .getAmount(), - tStack) }, - iRecipeInputRecipeOutputEntry.getValue().items.toArray(new ItemStack[0]), - null, - null, - null, - null, - 300, - 2, - 0); - case "gt.recipe.thermalcentrifuge" -> aGTRecipeMap.addRecipe( - true, - new ItemStack[] { GT_Utility.copyAmount( - iRecipeInputRecipeOutputEntry.getKey() - .getAmount(), - tStack) }, - iRecipeInputRecipeOutputEntry.getValue().items.toArray(new ItemStack[0]), - null, - null, - null, - null, - 500, - 48, - 0); + tStack)) + .itemOutputs(iRecipeInputRecipeOutputEntry.getValue().items.toArray(new ItemStack[0])) + .duration(15 * SECONDS) + .eut(2) + .addTo(aGTRecipeMap); + case "gt.recipe.thermalcentrifuge" -> GT_Values.RA.stdBuilder() + .itemInputs( + GT_Utility.copyAmount( + iRecipeInputRecipeOutputEntry.getKey() + .getAmount(), + tStack)) + .itemOutputs(iRecipeInputRecipeOutputEntry.getValue().items.toArray(new ItemStack[0])) + .duration(25 * SECONDS) + .eut(48) + .addTo(aGTRecipeMap); } } catch (Exception e) { System.err.println(e); @@ -870,48 +683,10 @@ public class GT_ModHandler { return emptyRecipeMap; } - public static Map<IRecipeInput, RecipeOutput> getMassFabricatorList() { - try { - return ic2.api.recipe.Recipes.matterAmplifier.getRecipes(); - } catch (Throwable e) { - /* Do nothing */ - } - return emptyRecipeMap; - } - - /** - * IC2-ThermalCentrifuge Recipe. Overloads old Recipes automatically - */ - @Deprecated - public static boolean addThermalCentrifugeRecipe(ItemStack aInput, int[] aChances, int aHeat, Object... aOutput) { - if (aInput == null || aOutput == null || aOutput.length == 0 || aOutput[0] == null) return false; - RA.addThermalCentrifugeRecipe( - aInput, - (ItemStack) aOutput[0], - aOutput.length >= 2 ? (ItemStack) aOutput[1] : null, - aOutput.length >= 3 ? (ItemStack) aOutput[2] : null, - aChances, - 500, - 48); - return true; - } - - @Deprecated - public static boolean addThermalCentrifugeRecipe(ItemStack aInput, int aHeat, Object... aOutput) { - if (aInput == null || aOutput == null || aOutput.length == 0 || aOutput[0] == null) return false; - RA.addThermalCentrifugeRecipe( - aInput, - (ItemStack) aOutput[0], - aOutput.length >= 2 ? (ItemStack) aOutput[1] : null, - aOutput.length >= 3 ? (ItemStack) aOutput[2] : null, - 500, - 48); - return true; - } - /** * IC2-OreWasher Recipe. Overloads old Recipes automatically */ + @Deprecated public static boolean addOreWasherRecipe(ItemStack aInput, int[] aChances, int aWaterAmount, Object... aOutput) { if (aInput == null || aOutput == null || aOutput.length == 0 || aOutput[0] == null) return false; RA.stdBuilder() @@ -934,76 +709,6 @@ public class GT_ModHandler { return true; } - public static boolean addOreWasherRecipe(ItemStack aInput, int aWaterAmount, Object... aOutput) { - if (aInput == null || aOutput == null || aOutput.length == 0 || aOutput[0] == null) return false; - RA.stdBuilder() - .itemInputs(aInput) - .itemOutputs((ItemStack) aOutput[0], (ItemStack) aOutput[1], (ItemStack) aOutput[2]) - .fluidInputs(GT_ModHandler.getWater(aWaterAmount)) - .duration(25 * SECONDS) - .eut(16) - .addTo(oreWasherRecipes); - - RA.stdBuilder() - .itemInputs(aInput) - .itemOutputs((ItemStack) aOutput[0], (ItemStack) aOutput[1], (ItemStack) aOutput[2]) - .fluidInputs(GT_ModHandler.getDistilledWater(aWaterAmount / 5)) - .duration(15 * SECONDS) - .eut(16) - .addTo(oreWasherRecipes); - return true; - } - - /** - * IC2-Compressor Recipe. Overloads old Recipes automatically - */ - @Deprecated - public static boolean addCompressionRecipe(ItemStack aInput, ItemStack aOutput) { - return addCompressionRecipe(aInput, aOutput, 300, 2); - } - - /** - * IC2-Compressor Recipe. Overloads old Recipes automatically - */ - @Deprecated - public static boolean addCompressionRecipe(ItemStack aInput, ItemStack aOutput, int duration, int EUPerTick) { - aOutput = GT_OreDictUnificator.get(true, aOutput); - if (aInput == null || aOutput == null || GT_Utility.areStacksEqual(aInput, aOutput, true)) return false; - RA.addCompressorRecipe(aInput, aOutput, duration, EUPerTick); - return true; - } - - /** - * @param aValue Scrap = 5000, Scrapbox = 45000, Diamond Dust 125000 - */ - public static boolean addIC2MatterAmplifier(ItemStack aAmplifier, int aValue) { - if (aAmplifier == null || aValue <= 0) return false; - try { - NBTTagCompound tNBT = new NBTTagCompound(); - tNBT.setInteger("amplification", aValue); - GT_Utility - .callMethod(ic2.api.recipe.Recipes.matterAmplifier, "addRecipe", false, false, false, aAmplifier, tNBT); - } catch (Throwable e) { - /* Do nothing */ - } - return true; - } - - /** - * Rolling Machine Crafting Recipe - */ - public static boolean addRollingMachineRecipe(ItemStack aResult, Object[] aRecipe) { - aResult = GT_OreDictUnificator.get(true, aResult); - if (aResult == null || aRecipe == null || aResult.stackSize <= 0) return false; - try { - mods.railcraft.api.crafting.RailcraftCraftingManager.rollingMachine.getRecipeList() - .add(new ShapedOreRecipe(GT_Utility.copyOrNull(aResult), aRecipe)); - } catch (Throwable e) { - return addCraftingRecipe(GT_Utility.copyOrNull(aResult), aRecipe); - } - return true; - } - public static void stopBufferingCraftingRecipes() { sBufferCraftingRecipes = false; @@ -2498,54 +2203,4 @@ public class GT_ModHandler { */ public static long DONT_REMOVE_SHAPELESS = B[13]; } - - /** - * Copy of the original Helper Class of Thermal Expansion, just to make sure it works even when other Mods include - * TE-APIs - */ - public static class ThermalExpansion { - - public static void addFurnaceRecipe(int energy, ItemStack input, ItemStack output) {} - - public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput) {} - - public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput, - ItemStack secondaryOutput) {} - - public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput, - ItemStack secondaryOutput, int secondaryChance) {} - - public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput) {} - - public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput, - ItemStack secondaryOutput) {} - - public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput, - ItemStack secondaryOutput, int secondaryChance) {} - - public static void addSmelterRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput, - ItemStack primaryOutput) {} - - public static void addSmelterRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput, - ItemStack primaryOutput, ItemStack secondaryOutput) {} - - public static void addSmelterRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput, - ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {} - - public static void addSmelterBlastOre(Materials aMaterial) {} - - public static void addCrucibleRecipe(int energy, ItemStack input, FluidStack output) {} - - public static void addTransposerFill(int energy, ItemStack input, ItemStack output, FluidStack fluid, - boolean reversible) {} - - public static void addTransposerExtract(int energy, ItemStack input, ItemStack output, FluidStack fluid, - int chance, boolean reversible) {} - - public static void addMagmaticFuel(String fluidName, int energy) {} - - public static void addCompressionFuel(String fluidName, int energy) {} - - public static void addCoolant(String fluidName, int energy) {} - } } diff --git a/src/main/java/gregtech/api/util/GT_RecipeBuilder.java b/src/main/java/gregtech/api/util/GT_RecipeBuilder.java index 6f7c9a81bb..66bc11444a 100644 --- a/src/main/java/gregtech/api/util/GT_RecipeBuilder.java +++ b/src/main/java/gregtech/api/util/GT_RecipeBuilder.java @@ -334,14 +334,6 @@ public class GT_RecipeBuilder { return this; } - /** - * Really just {@link #special(Object)}, but with a different signature to make it less confusing. WARNING: only for - * legacy recipe map. do not abuse. - */ - public GT_RecipeBuilder specialItem(ItemStack specialItem) { - return special(specialItem); - } - public GT_RecipeBuilder duration(int duration) { this.duration = duration; return this; diff --git a/src/main/java/gregtech/api/util/GT_RecipeConstants.java b/src/main/java/gregtech/api/util/GT_RecipeConstants.java index d9d6c7d7d2..0828112fc7 100644 --- a/src/main/java/gregtech/api/util/GT_RecipeConstants.java +++ b/src/main/java/gregtech/api/util/GT_RecipeConstants.java @@ -97,6 +97,88 @@ public class GT_RecipeConstants { public static final RecipeMetadataKey<Boolean> ON_FIRE = SimpleRecipeMetadataKey.create(Boolean.class, "on_fire"); /** + * Nano Forge Tier. + */ + public static final RecipeMetadataKey<Integer> NANO_FORGE_TIER = SimpleRecipeMetadataKey + .create(Integer.class, "nano_forge_tier"); + + /** + * FOG Exotic recipe tier. + */ + public static final RecipeMetadataKey<Integer> FOG_EXOTIC_TIER = SimpleRecipeMetadataKey + .create(Integer.class, "fog_exotic_tier"); + + /** + * FOG Plasma recipe tier. + */ + public static final RecipeMetadataKey<Integer> FOG_PLASMA_TIER = SimpleRecipeMetadataKey + .create(Integer.class, "fog_plasma_tier"); + + /** + * DEFC Casing tier. + */ + public static final RecipeMetadataKey<Integer> DEFC_CASING_TIER = SimpleRecipeMetadataKey + .create(Integer.class, "defc_casing_tier"); + + /** + * Chemplant Casing tier. Beware, codewise index starts at 0, but it is tier 1. + */ + public static final RecipeMetadataKey<Integer> CHEMPLANT_CASING_TIER = SimpleRecipeMetadataKey + .create(Integer.class, "chemplant_casing_tier"); + + /** + * QFT Focus tier. + */ + public static final RecipeMetadataKey<Integer> QFT_FOCUS_TIER = SimpleRecipeMetadataKey + .create(Integer.class, "qft_focus_tier"); + + /** + * Dissolution Tank Ratio. + */ + public static final RecipeMetadataKey<Integer> DISSOLUTION_TANK_RATIO = SimpleRecipeMetadataKey + .create(Integer.class, "dissolution_tank_ratio"); + + /** + * Duration in days for the RTG. + */ + public static final RecipeMetadataKey<Integer> RTG_DURATION_IN_DAYS = SimpleRecipeMetadataKey + .create(Integer.class, "rtg_duration_in_days"); + + /** + * Basic output for the Large Naquadah Generator. + */ + public static final RecipeMetadataKey<Integer> LNG_BASIC_OUTPUT = SimpleRecipeMetadataKey + .create(Integer.class, "lng_basic_output"); + + /** + * Coil tier for the Naquadah Fuel Refinery. + */ + public static final RecipeMetadataKey<Integer> NFR_COIL_TIER = SimpleRecipeMetadataKey + .create(Integer.class, "nfr_coil_tier"); + + /** + * NKE range for the neutron activator. + */ + public static final RecipeMetadataKey<Integer> NKE_RANGE = SimpleRecipeMetadataKey + .create(Integer.class, "nke_range"); + /** + * Precise Assembler casing tier. + */ + public static final RecipeMetadataKey<Integer> PRECISE_ASSEMBLER_CASING_TIER = SimpleRecipeMetadataKey + .create(Integer.class, "precise_assembler_casing_tier"); + /** + * CoAL casing tier. + */ + public static final RecipeMetadataKey<Integer> COAL_CASING_TIER = SimpleRecipeMetadataKey + .create(Integer.class, "coal_casing_tier"); + + /** + * LFTR output power. + */ + public static final RecipeMetadataKey<Integer> LFTR_OUTPUT_POWER = SimpleRecipeMetadataKey + .create(Integer.class, "lftr_output_power"); + + /** * Add a arc furnace recipe. Adds to both normal arc furnace and plasma arc furnace. * Will override the fluid input with oxygen/plasma for the respective recipe maps, so there is no point setting it. */ @@ -328,5 +410,19 @@ public class GT_RecipeConstants { GT_RecipeMapUtil.SPECIAL_VALUE_ALIASES.add(COIL_HEAT); GT_RecipeMapUtil.SPECIAL_VALUE_ALIASES.add(FUSION_THRESHOLD); GT_RecipeMapUtil.SPECIAL_VALUE_ALIASES.add(FUEL_VALUE); + GT_RecipeMapUtil.SPECIAL_VALUE_ALIASES.add(NANO_FORGE_TIER); + GT_RecipeMapUtil.SPECIAL_VALUE_ALIASES.add(FOG_EXOTIC_TIER); + GT_RecipeMapUtil.SPECIAL_VALUE_ALIASES.add(FOG_PLASMA_TIER); + GT_RecipeMapUtil.SPECIAL_VALUE_ALIASES.add(DEFC_CASING_TIER); + GT_RecipeMapUtil.SPECIAL_VALUE_ALIASES.add(CHEMPLANT_CASING_TIER); + GT_RecipeMapUtil.SPECIAL_VALUE_ALIASES.add(QFT_FOCUS_TIER); + GT_RecipeMapUtil.SPECIAL_VALUE_ALIASES.add(DISSOLUTION_TANK_RATIO); + GT_RecipeMapUtil.SPECIAL_VALUE_ALIASES.add(RTG_DURATION_IN_DAYS); + GT_RecipeMapUtil.SPECIAL_VALUE_ALIASES.add(LNG_BASIC_OUTPUT); + GT_RecipeMapUtil.SPECIAL_VALUE_ALIASES.add(NFR_COIL_TIER); + GT_RecipeMapUtil.SPECIAL_VALUE_ALIASES.add(NKE_RANGE); + GT_RecipeMapUtil.SPECIAL_VALUE_ALIASES.add(PRECISE_ASSEMBLER_CASING_TIER); + GT_RecipeMapUtil.SPECIAL_VALUE_ALIASES.add(COAL_CASING_TIER); + } } diff --git a/src/main/java/gregtech/api/util/GasSpargingRecipe.java b/src/main/java/gregtech/api/util/GasSpargingRecipe.java index 667cc78d85..527359e0e8 100644 --- a/src/main/java/gregtech/api/util/GasSpargingRecipe.java +++ b/src/main/java/gregtech/api/util/GasSpargingRecipe.java @@ -2,10 +2,10 @@ package gregtech.api.util; import net.minecraftforge.fluids.FluidStack; +import gregtech.api.enums.TierEU; import gtPlusPlus.api.objects.data.AutoMap; import gtPlusPlus.core.util.data.ArrayUtils; import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; public class GasSpargingRecipe implements Comparable<GasSpargingRecipe> { @@ -29,7 +29,7 @@ public class GasSpargingRecipe implements Comparable<GasSpargingRecipe> { mFluidOutputs = aOutputs; mMaxOutputQuantity = aMaxOutputQuantity; mDuration = 500; - mEUt = MaterialUtils.getVoltageForTier(5); + mEUt = (int) TierEU.RECIPE_IV; } @Override diff --git a/src/main/java/gregtech/api/util/HotFuel.java b/src/main/java/gregtech/api/util/HotFuel.java deleted file mode 100644 index 6054a57b84..0000000000 --- a/src/main/java/gregtech/api/util/HotFuel.java +++ /dev/null @@ -1,40 +0,0 @@ -package gregtech.api.util; - -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -import gtPlusPlus.api.recipe.GTPPRecipeMaps; - -public class HotFuel { - - public static void addNewHotFuel(FluidStack aInput1, FluidStack aOutput1, ItemStack[] outputItems, int[] chances, - int aSpecialValue) { - GTPPRecipeMaps.thermalBoilerRecipes.addRecipe( - true, - null, - outputItems, - null, - chances, - new FluidStack[] { aInput1 }, - new FluidStack[] { aOutput1 }, - 1, // 1 Tick - 0, // No Eu produced - aSpecialValue // Magic Number - ); - } - - public static void addNewHotFuel(FluidStack aInput1, FluidStack aOutput1, FluidStack aOutput2, int aSpecialValue) { - GTPPRecipeMaps.thermalBoilerRecipes.addRecipe( - false, - null, - null, - null, - null, - new FluidStack[] { aInput1 }, - new FluidStack[] { aOutput1, aOutput2 }, - 20, // 1 Second - 0, // No Eu produced - aSpecialValue // Magic Number - ); - } -} diff --git a/src/main/java/gregtech/api/util/SemiFluidFuelHandler.java b/src/main/java/gregtech/api/util/SemiFluidFuelHandler.java index e3baa9ac90..aa983a5804 100644 --- a/src/main/java/gregtech/api/util/SemiFluidFuelHandler.java +++ b/src/main/java/gregtech/api/util/SemiFluidFuelHandler.java @@ -1,5 +1,6 @@ package gregtech.api.util; +import static gregtech.api.util.GT_RecipeConstants.FUEL_VALUE; import static gtPlusPlus.api.recipe.GTPPRecipeMaps.semiFluidFuels; import java.util.HashMap; @@ -8,6 +9,7 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; +import gregtech.api.enums.GT_Values; import gregtech.api.recipe.RecipeMaps; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.data.Pair; @@ -15,45 +17,6 @@ import gtPlusPlus.core.util.minecraft.FluidUtils; public class SemiFluidFuelHandler { - public static boolean addSemiFluidFuel(ItemStack aFuelItem, int aFuelValue) { - FluidStack p = FluidContainerRegistry.getFluidForFilledItem(aFuelItem); - if (p != null && aFuelValue > 0) { - return addSemiFluidFuel(p, aFuelValue); - } else { - Logger.INFO("Fuel value for " + aFuelItem.getDisplayName() + " is <= 0, ignoring."); - } - return false; - } - - public static boolean addSemiFluidFuel(FluidStack aFuel, int aFuelValue) { - FluidStack p = aFuel; - if (p != null && aFuelValue > 0) { - GT_Recipe aRecipe = new GT_Recipe( - true, - new ItemStack[] {}, - new ItemStack[] {}, - null, - new int[] {}, - new FluidStack[] { p }, - null, - 0, - 0, - aFuelValue); - if (aRecipe.mSpecialValue > 0) { - Logger.INFO( - "Added " + aRecipe.mFluidInputs[0].getLocalizedName() - + " to the Semi-Fluid Generator fuel map. Fuel Produces " - + (aRecipe.mSpecialValue * 1000) - + "EU per 1000L."); - semiFluidFuels.add(aRecipe); - return true; - } - } else { - Logger.INFO("Fuel value for " + p != null ? p.getLocalizedName() : "NULL Fluid" + " is <= 0, ignoring."); - } - return false; - } - public static boolean generateFuels() { final FluidStack aCreosote = FluidUtils.getFluidStack("creosote", 1000); final FluidStack aHeavyFuel = FluidUtils.getFluidStack("liquid_heavy_fuel", 1000); @@ -89,46 +52,45 @@ public class SemiFluidFuelHandler { } } for (Pair<FluidStack, Integer> p : aFoundFluidsFromItems.values()) { - if (p != null) { - int aFuelValue = p.getValue(); - if (p.getKey() - .isFluidEqual(aCreosote)) { - aFuelValue *= 6; - } else if (p.getKey() - .isFluidEqual(aHeavyFuel) - || p.getKey() - .isFluidEqual(aHeavyOil)) { - aFuelValue *= 1.5; - } else { - aFuelValue *= 2; - } + if (p == null) { + continue; + } - if (aFuelValue <= (128 * 3)) { - GT_Recipe aRecipe = new GT_Recipe( - true, - new ItemStack[] {}, - new ItemStack[] {}, - null, - new int[] {}, - new FluidStack[] { p.getKey() }, - null, - 0, - 0, - aFuelValue); - if (aRecipe.mSpecialValue > 0) { - Logger.INFO( - "Added " + aRecipe.mFluidInputs[0].getLocalizedName() - + " to the Semi-Fluid Generator fuel map. Fuel Produces " - + (aRecipe.mSpecialValue * 1000) - + "EU per 1000L."); - semiFluidFuels.add(aRecipe); + int aFuelValue = p.getValue(); + if (p.getKey() + .isFluidEqual(aCreosote)) { + aFuelValue *= 6; + } else if (p.getKey() + .isFluidEqual(aHeavyFuel) + || p.getKey() + .isFluidEqual(aHeavyOil)) { + aFuelValue *= 1.5; + } else { + aFuelValue *= 2; } - } else { - Logger.INFO( - "Boosted Fuel value for " + p.getKey() - .getLocalizedName() + " exceeds 512k, ignoring."); - } + + if (aFuelValue <= (128 * 3)) { + + GT_Values.RA.stdBuilder() + .fluidInputs(p.getKey()) + .duration(0) + .eut(0) + .metadata(FUEL_VALUE, aFuelValue) + .addTo(semiFluidFuels); + + Logger.INFO( + "Added " + p.getKey() + .getLocalizedName() + + " to the Semi-Fluid Generator fuel map. Fuel Produces " + + (aFuelValue * 1000) + + "EU per 1000L."); + + } else { + Logger.INFO( + "Boosted Fuel value for " + p.getKey() + .getLocalizedName() + " exceeds 512k, ignoring."); } + } return !semiFluidFuels.getAllRecipes() .isEmpty(); |