diff options
author | Johannes Gäßler <updrn@student.kit.edu> | 2017-04-19 23:36:50 +0200 |
---|---|---|
committer | Johannes Gäßler <updrn@student.kit.edu> | 2017-04-19 23:36:50 +0200 |
commit | 869cad0bbafb3e3817e491ba2aaa332649587816 (patch) | |
tree | 16b344a236e620ed6d91341f2df3289ca4b3e47e /src/main | |
parent | 2ee3b7e712413604549af3097fda93cbb22a262e (diff) | |
download | GT5-Unofficial-869cad0bbafb3e3817e491ba2aaa332649587816.tar.gz GT5-Unofficial-869cad0bbafb3e3817e491ba2aaa332649587816.tar.bz2 GT5-Unofficial-869cad0bbafb3e3817e491ba2aaa332649587816.zip |
Added a lot of (petro)chemistry stuff, expanded the API
Created an adapter class for creating materials.
Materials now have bit flags for automatic gas/fluid creation.
Added a new convenience method for adding distillery recipes.
Recipes now show the exact recipe duration instead of the duration
rounded down to the nearest int.
Added new Materials with relevant recipes:
Acetic Acid, Acetone, Calcium Acetate, Charcoal Byproducts, Carbon
Monoxide, Ethanol, Ethylene, Methanol, Methyl Acetate, Polyvinyl
Acetate, Propene, Sulfuric Ethylene, Vinyl Acetate
Made vinegar visible.
Diffstat (limited to 'src/main')
9 files changed, 358 insertions, 13 deletions
diff --git a/src/main/java/gregtech/api/enums/MaterialAdapter.java b/src/main/java/gregtech/api/enums/MaterialAdapter.java new file mode 100644 index 0000000000..f610c65328 --- /dev/null +++ b/src/main/java/gregtech/api/enums/MaterialAdapter.java @@ -0,0 +1,219 @@ +package gregtech.api.enums;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import gregtech.api.objects.MaterialStack;
+
+public class MaterialAdapter {
+ public static final int DIESEL = 0, GAS = 1, THERMAL = 2, SEMIFLUID = 3, PLASMA = 4, MAGIC = 5;
+
+ private int metaItemSubID;
+ private TextureSet iconSet;
+ private float toolSpeed = 1.0f;
+ private int durability = 0;
+ private int toolQuality = 0;
+ private int types = 0;
+ private int r = 255, g = 255, b = 255, a = 255;
+ private String name;
+ private String defaultLocalName;
+ private int fuelType = 0;
+ private int fuelPower = 0;
+ private int meltingPoint = 0;
+ private int blastFurnaceTemp = 0;
+ private boolean blastFurnaceRequired = false;
+ private boolean transparent = false;
+ private int oreValue = 1;
+ private int densityMultiplier = 1;
+ private int densityDivider = 1;
+ private Dyes color = Dyes._NULL;
+ private int extraData = 0;
+ private List<MaterialStack> materialList = new ArrayList<MaterialStack>();
+ private List<TC_Aspects.TC_AspectStack> aspects = new ArrayList<TC_Aspects.TC_AspectStack>();
+
+ public MaterialAdapter(int metaItemSubID, TextureSet iconSet, String defaultLocalName) {
+ this.metaItemSubID = metaItemSubID;
+ this.iconSet = iconSet;
+ this.name = defaultLocalName.replace(" ", "");
+ this.defaultLocalName = defaultLocalName;
+ }
+
+ public Materials constructMaterial() {
+ return new Materials(metaItemSubID, iconSet, toolSpeed, durability, toolQuality, types, r, g, b, a, name, defaultLocalName, fuelType, fuelPower, meltingPoint, blastFurnaceTemp,
+ blastFurnaceRequired, transparent, oreValue, densityMultiplier, densityDivider, color, extraData, materialList, aspects);
+ }
+
+ public MaterialAdapter setName(String name){
+ this.name = name;
+ return this;
+ }
+
+ public MaterialAdapter setTypes(int types){
+ this.types = types;
+ return this;
+ }
+
+ public MaterialAdapter addDustItems(){
+ types = types | 1;
+ return this;
+ }
+
+ public MaterialAdapter addMetalItems(){
+ types = types | 2;
+ return this;
+ }
+
+ public MaterialAdapter addGemItems(){
+ types = types | 4;
+ return this;
+ }
+
+ public MaterialAdapter addOreItems(){
+ types = types | 8;
+ return this;
+ }
+
+ public MaterialAdapter addCell(){
+ types = types | 16;
+ return this;
+ }
+
+ public MaterialAdapter addPlasma(){
+ types = types | 32;
+ return this;
+ }
+
+ public MaterialAdapter addToolHeadItems(){
+ types = types | 64;
+ return this;
+ }
+
+ public MaterialAdapter addGearItems(){
+ types = types | 128;
+ return this;
+ }
+
+ public MaterialAdapter addFluid(){
+ types = types | 256;
+ return this;
+ }
+
+ public MaterialAdapter addGas(){
+ types = types | 512;
+ return this;
+ }
+
+
+ public MaterialAdapter setRGBA(int r, int g, int b, int a){
+ this.r = r;
+ this.g = g;
+ this.b = b;
+ this.a = a;
+ return this;
+ }
+
+ public MaterialAdapter setRGB(int r, int g, int b){
+ this.r = r;
+ this.g = g;
+ this.b = b;
+ return this;
+ }
+
+ public MaterialAdapter setTransparent(boolean transparent){
+ this.transparent = transparent;
+ return this;
+ }
+
+ public MaterialAdapter setColor(Dyes color){
+ this.color = color;
+ return this;
+ }
+
+
+ public MaterialAdapter setToolSpeed(float toolSpeed) {
+ this.toolSpeed = toolSpeed;
+ return this;
+ }
+
+ public MaterialAdapter setDurability(int durability) {
+ this.durability = durability;
+ return this;
+ }
+
+ public MaterialAdapter setToolQuality(int toolQuality) {
+ this.toolQuality = toolQuality;
+ return this;
+ }
+
+
+ public MaterialAdapter setFuelType(int fuelType) {
+ this.fuelType = fuelType;
+ return this;
+ }
+
+ public MaterialAdapter setFuelPower(int fuelPower) {
+ this.fuelPower = fuelPower;
+ return this;
+ }
+
+ public MaterialAdapter setMeltingPoint(int meltingPoint) {
+ this.meltingPoint = meltingPoint;
+ return this;
+ }
+
+ public MaterialAdapter setBlastFurnaceTemp(int blastFurnaceTemp) {
+ this.blastFurnaceTemp = blastFurnaceTemp;
+ return this;
+ }
+
+ public MaterialAdapter setBlastFurnaceRequired(boolean blastFurnaceRequired) {
+ this.blastFurnaceRequired = blastFurnaceRequired;
+ return this;
+ }
+
+ public MaterialAdapter setOreValue(int oreValue) {
+ this.oreValue = oreValue;
+ return this;
+ }
+
+ public MaterialAdapter setDensityMultiplier(int densityMultiplier) {
+ this.densityMultiplier = densityMultiplier;
+ return this;
+ }
+
+ public MaterialAdapter setDensityDivider(int densityDivider) {
+ this.densityDivider = densityDivider;
+ return this;
+ }
+
+ public MaterialAdapter setExtraData(int extraData) {
+ this.extraData = extraData;
+ return this;
+ }
+
+ public MaterialAdapter addElectrolyzerRecipe(){
+ extraData = extraData | 1;
+ return this;
+ }
+
+ public MaterialAdapter addCentrifugeRecipe(){
+ extraData = extraData | 2;
+ return this;
+ }
+
+ public MaterialAdapter setMaterialList(List<MaterialStack> materialList) {
+ this.materialList = materialList;
+ return this;
+ }
+
+ public MaterialAdapter setMaterialList(MaterialStack ... materials) {
+ this.materialList = Arrays.asList(materials);
+ return this;
+ }
+
+ public MaterialAdapter setAspects(List<TC_Aspects.TC_AspectStack> aspects) {
+ this.aspects = aspects;
+ return this;
+ }
+}
diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index bb94cb50c1..edf4ac700c 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -11,6 +11,7 @@ import gregtech.api.objects.GT_FluidStack; import gregtech.api.objects.MaterialStack; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; +import gregtech.common.GT_Proxy; import gregtech.loaders.materialprocessing.ProcessingConfig; import gregtech.loaders.materialprocessing.ProcessingModSupport; import net.minecraft.enchantment.Enchantment; @@ -380,6 +381,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Coffee = new Materials(888, TextureSet.SET_FINE, 1.0F, 0, 0, 1, 150, 75, 0, 0, "Coffee", "Coffee", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBrown); public static Materials Creosote = new Materials(712, TextureSet.SET_FLUID, 1.0F, 0, 0, 16, 128, 64, 0, 0, "Creosote", "Creosote", 3, 8, -1, 0, false, false, 1, 1, 1, Dyes.dyeBrown); public static Materials Ethanol = new Materials(706, TextureSet.SET_FLUID, 1.0F, 0, 0, 16, 255, 128, 0, 0, "Ethanol", "Ethanol", 0, 128, -1, 0, false, false, 1, 1, 1, Dyes.dyePurple); + public static Materials FermentedBiomass = new MaterialAdapter(691, TextureSet.SET_FLUID, "Fermented Biomass").addCell().addFluid().setRGB(68, 85, 0).setColor(Dyes.dyeBrown).constructMaterial(); public static Materials FishOil = new Materials(711, TextureSet.SET_FLUID, 1.0F, 0, 0, 16, 255, 196, 0, 0, "FishOil", "Fish Oil", 3, 2, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 2))); public static Materials Fuel = new Materials(708, TextureSet.SET_FLUID, 1.0F, 0, 0, 16, 255, 255, 0, 0, "Fuel", "Diesel", 0, 128, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow); public static Materials Glue = new Materials(726, TextureSet.SET_FLUID, 1.0F, 0, 0, 16, 200, 196, 0, 0, "Glue", "Glue", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.LIMUS, 2))); @@ -408,6 +410,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials TNT = new Materials(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "TNT", "TNT", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeRed, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 7), new TC_AspectStack(TC_Aspects.IGNIS, 4))); public static Materials Unstable = new Materials(-1, TextureSet.SET_NONE, 1.0F, 0, 4, 0, 255, 255, 255, 127, "Unstable", "Unstable", 0, 0, -1, 0, false, true, 1, 1, 1, Dyes.dyeWhite, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 4))); public static Materials Unstableingot = new Materials(-1, TextureSet.SET_NONE, 1.0F, 0, 4, 0, 255, 255, 255, 127, "Unstableingot", "Unstable", 0, 0, -1, 0, false, true, 1, 1, 1, Dyes.dyeWhite, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 4))); + public static Materials Vinegar = new MaterialAdapter(690, TextureSet.SET_FLUID, "Vinegar").setColor(Dyes.dyeBrown).constructMaterial(); public static Materials Wheat = new Materials(881, TextureSet.SET_POWDER, 1.0F, 0, 0, 1, 255, 255, 196, 0, "Wheat", "Wheat", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 2))); /** @@ -424,7 +427,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { * First Degree Compounds */ public static Materials Methane = new Materials(715, TextureSet.SET_FLUID, 1.0F, 0, 1, 16, 255, 255, 255, 0, "Methane", "Methane", 1, 45, -1, 0, false, false, 3, 1, 1, Dyes.dyeMagenta, 1, Arrays.asList(new MaterialStack(Carbon, 1), new MaterialStack(Hydrogen, 4))); - public static Materials CarbonDioxide = new Materials(497, TextureSet.SET_FLUID, 1.0F, 0, 2, 16|32, 169, 208, 245, 240, "CarbonDioxide", "Carbon Dioxide", 0, 0, 25, 1, false, true, 1, 1, 1, Dyes.dyeLightBlue, 1, Arrays.asList(new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 2))); + public static Materials CarbonDioxide = new Materials(497, TextureSet.SET_FLUID, 1.0F, 0, 2, 16|32|512, 169, 208, 245, 240, "CarbonDioxide", "Carbon Dioxide", 0, 0, 25, 1, false, true, 1, 1, 1, Dyes.dyeLightBlue, 1, Arrays.asList(new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 2))); public static Materials NobleGases = new Materials(496, TextureSet.SET_FLUID, 1.0F, 0, 2, 16|32, 169, 208, 245, 240, "NobleGases", "Noble Gases", 0, 0, 4, 0, false, true, 1, 1, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(CarbonDioxide, 21), new MaterialStack(Helium, 9), new MaterialStack(Methane, 3), new MaterialStack(Deuterium, 1))); public static Materials Air = new Materials(-1, TextureSet.SET_FLUID, 1.0F, 0, 2, 16|32, 169, 208, 245, 240, "Air", "Air", 0, 0, -1, 0, false, true, 1, 1, 1, Dyes.dyeLightBlue, 0, Arrays.asList(new MaterialStack(Nitrogen, 40), new MaterialStack(Oxygen, 11), new MaterialStack(Argon, 1), new MaterialStack(NobleGases, 1))); public static Materials LiquidAir = new Materials(495, TextureSet.SET_FLUID, 1.0F, 0, 2, 16|32, 169, 208, 245, 240, "LiquidAir", "Liquid Air", 0, 0, 4, 0, false, true, 1, 1, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Nitrogen, 40), new MaterialStack(Oxygen, 11), new MaterialStack(Argon, 1), new MaterialStack(NobleGases, 1))); @@ -532,6 +535,19 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials CrackedLightFuel = new Materials(743, TextureSet.SET_FLUID, 1.0F, 0, 0, 16, 255, 255, 0, 0, "CrackedLightFuel", "Cracked Light Fuel", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow); public static Materials CrackedHeavyFuel = new Materials(744, TextureSet.SET_FLUID, 1.0F, 0, 0, 16, 255, 255, 0, 0, "CrackedHeavyFuel", "Cracked Heavy Fuel", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack); + public static Materials AceticAcid = new MaterialAdapter(670, TextureSet.SET_FLUID, "Acetic Acid").addCell().addFluid().setRGB(200, 180, 160).setColor(Dyes.dyeWhite).setMaterialList(new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 4), new MaterialStack(Oxygen, 2)).addElectrolyzerRecipe().constructMaterial(); + public static Materials CalciumAcetate = new MaterialAdapter(671, TextureSet.SET_RUBY, "Calcium Acetate").addDustItems().addCell().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setMaterialList(new MaterialStack(Calcium, 1), new MaterialStack(AceticAcid, 2)).addElectrolyzerRecipe().constructMaterial(); + public static Materials Acetone = new MaterialAdapter(672, TextureSet.SET_FLUID, "Acetone").addCell().addFluid().setRGB(175, 175, 175).setColor(Dyes.dyeWhite).setMaterialList(new MaterialStack(Carbon, 3), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); + public static Materials Methanol = new MaterialAdapter(673, TextureSet.SET_FLUID, "Methanol").addCell().addFluid().setRGB(170, 136, 0).setColor(Dyes.dyeBrown).setFuelPower(96).setMaterialList(new MaterialStack(Carbon, 1), new MaterialStack(Hydrogen, 4), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); + public static Materials CarbonMonoxide = new MaterialAdapter(674, TextureSet.SET_FLUID, "Carbon Monoxide").addCell().addGas().setRGB(14, 72, 128).setColor(Dyes.dyeBrown).setFuelType(MaterialAdapter.GAS).setFuelPower(8).setMaterialList(new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); + public static Materials CharcoalByproducts = new MaterialAdapter(675, TextureSet.SET_FLUID, "Charcoal Byproducts").addCell().setRGB(40, 23, 11).setColor(Dyes.dyeBrown).constructMaterial(); + public static Materials SulfuricEthylene = new MaterialAdapter(676, TextureSet.SET_FLUID, "Sulfuric Ethylene").addCell().addGas().setRGB(225, 225, 225).setColor(Dyes.dyeWhite).setFuelType(MaterialAdapter.GAS).setFuelPower(18).constructMaterial(); + public static Materials Ethylene = new MaterialAdapter(677, TextureSet.SET_FLUID, "Ethylene").addCell().addGas().setRGB(225, 225, 225).setColor(Dyes.dyeWhite).setFuelType(MaterialAdapter.GAS).setFuelPower(288).constructMaterial(); + public static Materials Propene = new MaterialAdapter(678, TextureSet.SET_FLUID, "Propene").addCell().addGas().setRGB(255, 221, 85).setColor(Dyes.dyeYellow).setFuelType(MaterialAdapter.GAS).setFuelPower(144).constructMaterial(); + public static Materials VinylAcetate = new MaterialAdapter(679, TextureSet.SET_FLUID, "Vinyl Acetate").addCell().addFluid().setRGB(255, 179, 128).setColor(Dyes.dyeOrange).constructMaterial(); + public static Materials PolyvinylAcetate = new MaterialAdapter(680, TextureSet.SET_FLUID, "Polyinyl Acetate").addCell().addFluid().setRGB(255, 153, 85).setColor(Dyes.dyeOrange).constructMaterial(); + public static Materials MethylAcetate = new MaterialAdapter(681, TextureSet.SET_FLUID, "Methyl Acetate").addCell().addFluid().setRGB(238, 198, 175).setColor(Dyes.dyeOrange).constructMaterial(); + public static Materials SolderingAlloy = new Materials(314, TextureSet.SET_DULL, 1.0F, 0, 1, 1|2, 220, 220, 230, 0, "SolderingAlloy", "Soldering Alloy", 0, 0, 400, 400, false, false, 1, 1, 1, Dyes.dyeWhite, 2, Arrays.asList(new MaterialStack(Tin, 9), new MaterialStack(Antimony, 1))); public static Materials GalliumArsenide = new Materials(980, TextureSet.SET_DULL, 1.0F, 0, 1, 1|2, 160, 160, 160, 0, "GalliumArsenide", "Gallium Arsenide", 0, 0, -1, 1200, true, false, 1, 1, 1, Dyes.dyeGray, 2, Arrays.asList(new MaterialStack(Arsenic, 1), new MaterialStack(Gallium, 1))); public static Materials IndiumGalliumPhosphide = new Materials(981, TextureSet.SET_DULL, 1.0F, 0, 1, 1|2, 160, 140, 190, 0, "IndiumGalliumPhosphide", "Indium Gallium Phosphide", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, 2, Arrays.asList(new MaterialStack(Indium, 1), new MaterialStack(Gallium, 1), new MaterialStack(Phosphor, 1))); @@ -1492,6 +1508,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { * 32 = Plasma Cells * 64 = Tool Heads * 128 = Gears + * 256 = Automatically create a corresponding fluid for this material + * 512 = Automatically create a corresponding gas for this material * @param aR, aG, aB Color of the Material 0-255 each. * @param aA transparency of the Material Texture. 0 = fully visible, 255 = Invisible. * @param aName The Name used as Default for localization. @@ -1888,4 +1906,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } public static volatile int VERSION = 509; + + public static Collection<Materials> getAll(){ + return MATERIALS_MAP.values(); + } }
\ No newline at end of file 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 6aff060bfa..4c88c4f882 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java @@ -422,6 +422,8 @@ public interface IGT_RecipeAdder { */ public boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden); + public boolean addDistilleryRecipe(int aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden); + /** * Adds a Recipe for the Fluid Solidifier */ diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 91033a1f34..406dcc0a59 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -1538,6 +1538,16 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { return rFuelValue; } + public Fluid addAutoGeneratedCorrespondingFluid(Materials aMaterial){ + return addFluid(aMaterial.mDefaultLocalName.replace(" ", "_").toLowerCase(Locale.ENGLISH), "molten.autogenerated", aMaterial.mDefaultLocalName, aMaterial, + aMaterial.mRGBa, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); + } + + public Fluid addAutoGeneratedCorrespondingGas(Materials aMaterial) { + return addFluid(aMaterial.mDefaultLocalName.replace(" ", "_").toLowerCase(Locale.ENGLISH), "molten.autogenerated", aMaterial.mDefaultLocalName, aMaterial, + aMaterial.mRGBa, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); + } + public Fluid addAutogeneratedMoltenFluid(Materials aMaterial) { return addFluid("molten." + aMaterial.mName.toLowerCase(Locale.ENGLISH), "molten.autogenerated", "Molten " + aMaterial.mDefaultLocalName, aMaterial, aMaterial.mMoltenRGBa, 4, aMaterial.mMeltingPoint <= 0 ? 1000 : aMaterial.mMeltingPoint, null, null, 0); @@ -1756,4 +1766,6 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { this.mModID = ((aModID == null) || (aModID.equals("UNKNOWN")) ? null : aModID); } } + + }
\ No newline at end of file diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index a0519ebbe3..0a407926f9 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -504,6 +504,10 @@ public class GT_RecipeAdder return true; } + public boolean addDistilleryRecipe(int circuitConfig, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden) { + return addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, circuitConfig, new Object[0]), aInput, aOutput, aDuration, aEUt, aHidden); + } + public boolean addFluidSolidifierRecipe(ItemStack aMold, FluidStack aInput, ItemStack aOutput, int aDuration, int aEUt) { if ((aMold == null) || (aInput == null) || (aOutput == null)) { return false; diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java index 8b0f8d9af1..28f82cbd5a 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java @@ -49,7 +49,7 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { ItemList.Bottle_Purple_Drink.set(addItem(tLastID = 100, "Purple Drink", "How about Lemonade. Or some Ice Tea? I got Purple Drink!", new Object[]{new GT_FoodStat(8, 0.2F, EnumAction.drink, ItemList.Bottle_Empty.get(1L, new Object[0]), GregTech_API.sDrinksAlwaysDrinkable, false, false, new int[]{Potion.moveSlowdown.id, 400, 1, 90}), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VINCULUM, 1L)}));
ItemList.Bottle_Grape_Juice.set(addItem(tLastID = 101, "Grape Juice", "This has a cleaning effect on your internals.", new Object[]{new GT_FoodStat(4, 0.2F, EnumAction.drink, ItemList.Bottle_Empty.get(1L, new Object[0]), GregTech_API.sDrinksAlwaysDrinkable, false, false, new int[]{Potion.hunger.id, 400, 1, 60}), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L)}));
ItemList.Bottle_Wine.set(addItem(tLastID = 102, "Wine", "Ordinary", new Object[]{new GT_FoodStat(2, 0.2F, EnumAction.drink, ItemList.Bottle_Empty.get(1L, new Object[0]), GregTech_API.sDrinksAlwaysDrinkable, false, false, new int[]{Potion.confusion.id, 400, 1, 60, Potion.heal.id, 0, 0, 60, Potion.poison.id, 200, 1, 5}), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L)}));
- ItemList.Bottle_Vinegar.set(addItem(tLastID = 103, "Vinegar", "Exquisite", new Object[]{SubTag.INVISIBLE, new GT_FoodStat(2, 0.2F, EnumAction.drink, ItemList.Bottle_Empty.get(1L, new Object[0]), GregTech_API.sDrinksAlwaysDrinkable, false, false, new int[]{Potion.confusion.id, 400, 1, 90, Potion.heal.id, 0, 1, 90, Potion.poison.id, 200, 2, 10, Potion.harm.id, 0, 2, 5}), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L)}));
+ ItemList.Bottle_Vinegar.set(addItem(tLastID = 103, "Vinegar", "Exquisite", new Object[]{new GT_FoodStat(2, 0.2F, EnumAction.drink, ItemList.Bottle_Empty.get(1L, new Object[0]), GregTech_API.sDrinksAlwaysDrinkable, false, false, new int[]{Potion.confusion.id, 400, 1, 90, Potion.heal.id, 0, 1, 90, Potion.poison.id, 200, 2, 10, Potion.harm.id, 0, 2, 5}), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L)}));
ItemList.Bottle_Potato_Juice.set(addItem(tLastID = 104, "Potato Juice", "Ever seen Potato Juice in stores? No? That has a reason.", new Object[]{SubTag.INVISIBLE, new GT_FoodStat(3, 0.3F, EnumAction.drink, ItemList.Bottle_Empty.get(1L, new Object[0]), GregTech_API.sDrinksAlwaysDrinkable, false, false, new int[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L)}));
ItemList.Bottle_Vodka.set(addItem(tLastID = 105, "Vodka", "Not to confuse with Water", new Object[]{SubTag.INVISIBLE, new GT_FoodStat(2, 0.2F, EnumAction.drink, ItemList.Bottle_Empty.get(1L, new Object[0]), GregTech_API.sDrinksAlwaysDrinkable, false, false, new int[]{Potion.confusion.id, 500, 0, 60, Potion.damageBoost.id, 500, 1, 60, Potion.poison.id, 200, 1, 5}), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L)}));
ItemList.Bottle_Leninade.set(addItem(tLastID = 106, "Leninade", "Let the Communism flow through you!", new Object[]{SubTag.INVISIBLE, new GT_FoodStat(2, 0.2F, EnumAction.drink, ItemList.Bottle_Empty.get(1L, new Object[0]), GregTech_API.sDrinksAlwaysDrinkable, false, false, new int[]{Potion.confusion.id, 500, 1, 90, Potion.damageBoost.id, 500, 2, 90, Potion.poison.id, 200, 2, 10, Potion.harm.id, 0, 2, 5}), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 2L)}));
diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 7822fcddc9..df6c2ca704 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -1,6 +1,7 @@ package gregtech.loaders.postload; import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.registry.GameRegistry; import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.*; @@ -675,8 +676,8 @@ if(Loader.isModLoaded("Railcraft")){ GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 2L), null, Materials.Water.getFluid(2000), Materials.SulfuricAcid.getFluid(3000), ItemList.Cell_Empty.get(2, new Object[0]), 320); - GT_Values.RA.addChemicalRecipe(ItemList.Cell_Air.get(2, new Object[0]), null, Materials.Naphtha.getFluid(288), Materials.Plastic.getMolten(144), ItemList.Cell_Empty.get(2, new Object[0]), 640); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Titanium, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 16L), Materials.Naphtha.getFluid(1296), Materials.Plastic.getMolten(1296), ItemList.Cell_Empty.get(16, new Object[0]), 640); +// GT_Values.RA.addChemicalRecipe(ItemList.Cell_Air.get(2, new Object[0]), null, Materials.Naphtha.getFluid(288), Materials.Plastic.getMolten(144), ItemList.Cell_Empty.get(2, new Object[0]), 640); +// GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Titanium, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 16L), Materials.Naphtha.getFluid(1296), Materials.Plastic.getMolten(1296), ItemList.Cell_Empty.get(16, new Object[0]), 640); GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 1L), null, Materials.Naphtha.getFluid(576), Materials.Polycaprolactam.getMolten(1296), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Potassium, 1), 640); GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Polycaprolactam, 1L), new ItemStack(Items.string, 32), 80, 48); @@ -744,6 +745,7 @@ if(Loader.isModLoaded("Railcraft")){ GT_Values.RA.addBrewingRecipe(ItemList.IC2_Hops.get(1L, new Object[0]), tFluid, FluidRegistry.getFluid("potion.hopsjuice"), false); GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coffee, 1L), tFluid, FluidRegistry.getFluid("potion.darkcoffee"), false); GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chili, 1L), tFluid, FluidRegistry.getFluid("potion.chillysauce"), false); + GT_Values.RA.addBrewingRecipe(GT_ModHandler.getIC2Item("biochaff", 1), tFluid, FluidRegistry.getFluid("ic2biomass"), false); GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(2L, new Object[0]), 200); GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphorus, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(3L, new Object[0]), 300); @@ -800,21 +802,32 @@ if(Loader.isModLoaded("Railcraft")){ addPotionRecipes("speed", GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L)); addPotionRecipes("strength", GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Blaze, 1L)); + //Disable unused Fermentation recipes in favor of Fermented Biomass Production GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("milk", 50), FluidRegistry.getFluidStack("potion.mundane", 25), 1024, false); GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.lemonjuice", 50), FluidRegistry.getFluidStack("potion.limoncello", 25), 1024, true); GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.applejuice", 50), FluidRegistry.getFluidStack("potion.cider", 25), 1024, false); GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.goldenapplejuice", 50), FluidRegistry.getFluidStack("potion.goldencider", 25), 1024, true); GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.idunsapplejuice", 50), FluidRegistry.getFluidStack("potion.notchesbrew", 25), 1024, true); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.reedwater", 50), FluidRegistry.getFluidStack("potion.rum", 25), 1024, true); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.rum", 50), FluidRegistry.getFluidStack("potion.piratebrew", 10), 2048, true); +// GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.reedwater", 50), FluidRegistry.getFluidStack("potion.rum", 25), 1024, true); + GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.reedwater", 125), Materials.FermentedBiomass.getFluid(100), 640, false); + GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.rum", 50), FluidRegistry.getFluidStack("potion.piratebrew", 10), 2048, false); GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.grapejuice", 50), FluidRegistry.getFluidStack("potion.wine", 25), 1024, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.wine", 50), FluidRegistry.getFluidStack("potion.vinegar", 10), 2048, true); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.wheatyjuice", 50), FluidRegistry.getFluidStack("potion.scotch", 25), 1024, true); +// GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.wheatyjuice", 50), FluidRegistry.getFluidStack("potion.scotch", 25), 1024, true); + GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.wheatyjuice", 125), Materials.FermentedBiomass.getFluid(100), 640, false); GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.scotch", 50), FluidRegistry.getFluidStack("potion.glenmckenner", 10), 2048, true); GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.wheatyhopsjuice", 50), FluidRegistry.getFluidStack("potion.beer", 25), 1024, false); GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.hopsjuice", 50), FluidRegistry.getFluidStack("potion.darkbeer", 25), 1024, false); GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.darkbeer", 50), FluidRegistry.getFluidStack("potion.dragonblood", 10), 2048, true); - + GT_Values.RA.addFermentingRecipe(Materials.Biomass.getFluid(125), Materials.FermentedBiomass.getFluid(100), 640, false); + GT_Values.RA.addFermentingRecipe(new FluidStack(FluidRegistry.getFluid("ic2biomass"), 125), Materials.FermentedBiomass.getFluid(100), 640, false); + + GT_Values.RA.addFermentingRecipe(Materials.FermentedBiomass.getFluid(50), FluidRegistry.getFluidStack("potion.vinegar", 25), 2048, false); + GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.beer", 75), FluidRegistry.getFluidStack("potion.vinegar", 50), 2048, false); + GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.cider", 75), FluidRegistry.getFluidStack("potion.vinegar", 50), 2048, false); + GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.goldencider", 75), FluidRegistry.getFluidStack("potion.vinegar", 50), 2048, true); + GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.rum", 75), FluidRegistry.getFluidStack("potion.vinegar", 50), 2048, false); + GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.wine", 75), FluidRegistry.getFluidStack("potion.vinegar", 50), 2048, false); + GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.awkward", 50), FluidRegistry.getFluidStack("potion.weakness", 25), 1024, false); GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.mundane", 50), FluidRegistry.getFluidStack("potion.weakness", 25), 1024, false); GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.thick", 50), FluidRegistry.getFluidStack("potion.weakness", 25), 1024, false); @@ -1639,9 +1652,10 @@ if(Loader.isModLoaded("Railcraft")){ addProcess(tCrop, Materials.Emerald, 100, true); addProcess(tCrop, Materials.Beryllium, 100, false); + addRecipesApril2017ChemistryUpdate(); } - public void addProcess(ItemStack tCrop, Materials aMaterial, int chance, boolean aMainOutput) { + public void addProcess(ItemStack tCrop, Materials aMaterial, int chance, boolean aMainOutput) { if(tCrop==null||aMaterial==null||GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial,1)==null)return; if (GT_Mod.gregtechproxy.mNerfedCrops) { GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tCrop), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), Materials.Water.getFluid(1000), aMaterial.mOreByProducts.isEmpty() ? null : aMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), 96, 24); @@ -2512,7 +2526,70 @@ if(Loader.isModLoaded("Railcraft")){ new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 64L)})) }); } - + + } + + /** + * Adds recipes related to Acetic Acid, Acetone, Calcium Acetate, Charcoal Byproducts, Carbon Monoxide, Ethanol, Ethylene, Fermented Biomass, Methanol, Methyl Acetate, Polyvinyl Acetate, Propene, Sulfuric Ethylene, Vinyl Acetate + * Adds replacement recipes for Polyethylene + */ + private void addRecipesApril2017ChemistryUpdate(){ + GT_Values.RA.addUniversalDistillationRecipe(FluidRegistry.getFluidStack("potion.vinegar", 40), new FluidStack[]{Materials.Water.getFluid(35), Materials.AceticAcid.getFluid(5)}, GT_Values.NI, 20, 64); + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 1), GT_Values.NI, Materials.AceticAcid.getFluid(2000), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust,Materials.CalciumAcetate, 3), 240); + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 1), GT_Values.NI, Materials.AceticAcid.getFluid(2000), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust,Materials.CalciumAcetate, 3), 80); + GameRegistry.addSmelting(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.CalciumAcetate, 1), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Acetone, 1), 0); + + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.AceticAcid, 1), GT_Values.NI, Materials.Methanol.getFluid(1000), Materials.MethylAcetate.getFluid(1000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1), 240); + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Methanol, 1), GT_Values.NI, Materials.AceticAcid.getFluid(1000), Materials.MethylAcetate.getFluid(1000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1), 240); + + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Acetone, 3), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.PolyvinylAcetate.getFluid(2000), Materials.Glue.getFluid(5000), ItemList.Cell_Empty.get(3, new Object[0]), 100, 8); + GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.PolyvinylAcetate, 2), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Acetone.getFluid(3000), Materials.Glue.getFluid(5000), ItemList.Cell_Empty.get(2, new Object[0]), 100, 8); + + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1), GT_Values.NI, Materials.Oxygen.getGas(2000), Materials.CarbonDioxide.getGas(3000), GT_Values.NI, 40, 2); + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1), GT_Values.NI, Materials.CarbonDioxide.getGas(1000), Materials.CarbonMonoxide.getGas(2000), GT_Values.NI, 1200); + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Methanol, 1), GT_Values.NI, Materials.CarbonMonoxide.getGas(1000), Materials.AceticAcid.getFluid(2000), ItemList.Cell_Empty.get(1, new Object[0]), 300); + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.CarbonMonoxide, 1), GT_Values.NI, Materials.Methanol.getFluid(1000), Materials.AceticAcid.getFluid(2000), ItemList.Cell_Empty.get(1, new Object[0]), 300); + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.CarbonMonoxide, 1), GT_Values.NI, Materials.Hydrogen.getGas(2000), Materials.Methanol.getFluid(3000), ItemList.Cell_Empty.get(1, new Object[0]), 800, 96); + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2), GT_Values.NI, Materials.CarbonMonoxide.getGas(1000), Materials.Methanol.getFluid(3000), ItemList.Cell_Empty.get(2, new Object[0]), 800, 96); + + GT_Values.RA.addDistillationTowerRecipe(Materials.FermentedBiomass.getFluid(500), new FluidStack[]{Materials.Methane.getGas(700), Materials.Methanol.getFluid(25), Materials.Ethanol.getFluid(100), Materials.AceticAcid.getFluid(15), Materials.Water.getFluid(185)}, GT_Values.NI, 40, 360); + GT_Values.RA.addDistilleryRecipe(1, Materials.FermentedBiomass.getFluid(100), Materials.Methane.getGas(140), 160, 8, false); + GT_Values.RA.addDistilleryRecipe(2, Materials.FermentedBiomass.getFluid(100), Materials.Methanol.getFluid(5), 160, 8, false); + GT_Values.RA.addDistilleryRecipe(3, Materials.FermentedBiomass.getFluid(100), Materials.Ethanol.getFluid(20), 160, 8, false); + GT_Values.RA.addDistilleryRecipe(4, Materials.FermentedBiomass.getFluid(100), Materials.AceticAcid.getFluid(3), 160, 8, false); + GT_Values.RA.addDistilleryRecipe(5, Materials.FermentedBiomass.getFluid(100), Materials.Water.getFluid(37), 160, 8, false); + + GT_Values.RA.addDistillationTowerRecipe(Materials.CharcoalByproducts.getGas(500), new FluidStack[]{Materials.CarbonDioxide.getGas(100), Materials.CarbonMonoxide.getGas(25), Materials.Methane.getGas(75), Materials.AceticAcid.getFluid(50), Materials.Creosote.getFluid(250)}, GT_Values.NI, 16, 64); + GT_Values.RA.addDistilleryRecipe(1, Materials.CharcoalByproducts.getGas(100), Materials.CarbonDioxide.getGas(20), 64, 16, false); + GT_Values.RA.addDistilleryRecipe(2, Materials.CharcoalByproducts.getGas(100), Materials.CarbonMonoxide.getGas(10), 64, 16, false); + GT_Values.RA.addDistilleryRecipe(3, Materials.CharcoalByproducts.getGas(100), Materials.Methane.getGas(10), 64, 16, false); + GT_Values.RA.addDistilleryRecipe(4, Materials.CharcoalByproducts.getGas(100), Materials.AceticAcid.getFluid(10), 64, 16, false); + GT_Values.RA.addDistilleryRecipe(5, Materials.CharcoalByproducts.getGas(100), Materials.Creosote.getFluid(40), 64, 16, false); + GT_Values.RA.addDistilleryRecipe(5, Materials.CharcoalByproducts.getGas(100), Materials.Water.getFluid(10), 64, 16, false); + + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ethylene, 1), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.AceticAcid, 1), Materials.Oxygen.getGas(500), Materials.VinylAcetate.getFluid(1250),GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 2) , 160); + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ethylene, 2), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1), Materials.AceticAcid.getFluid(2000), Materials.VinylAcetate.getFluid(2500), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 3), 320); + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.AceticAcid, 2), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1), Materials.Ethylene.getGas(2000), Materials.VinylAcetate.getFluid(2500), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 3), 320); + + //Polyvinyl Acetate production, Oxygen/Titanium -> +50% Polyethylene each + GT_Values.RA.addChemicalRecipe(ItemList.Cell_Air.get(1, new Object[0]), ItemList.Circuit_Integrated.getWithDamage(0, 1, new Object[0]), Materials.VinylAcetate.getFluid(144), Materials.PolyvinylAcetate.getFluid(144), ItemList.Cell_Empty.get(2, new Object[0]), 160); + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1), ItemList.Circuit_Integrated.getWithDamage(0, 1, new Object[0]), Materials.VinylAcetate.getFluid(144), Materials.PolyvinylAcetate.getFluid(216), ItemList.Cell_Empty.get(2, new Object[0]), 160); + GT_Values.RA.addChemicalRecipe(ItemList.Cell_Air.get(12, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Titanium, 1), Materials.VinylAcetate.getFluid(1728), Materials.PolyvinylAcetate.getFluid(2592), ItemList.Cell_Empty.get(12, new Object[0]), 640); + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 12), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Titanium, 1), Materials.VinylAcetate.getFluid(1728), Materials.PolyvinylAcetate.getFluid(3456), ItemList.Cell_Empty.get(12, new Object[0]), 640); + + GT_Values.RA.addDistilleryRecipe(1, Materials.Naphtha.getFluid(100), Materials.Ethylene.getGas(50), 40, 16, false); + GT_Values.RA.addDistilleryRecipe(2, Materials.Naphtha.getFluid(100), Materials.Propene.getGas(25), 40, 16, false); + + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ethanol, 2), GT_Values.NI, Materials.SulfuricAcid.getFluid(500), Materials.SulfuricEthylene.getGas(1000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1), 800, 120); + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 1), ItemList.Cell_Empty.get(1, new Object[0]), Materials.SulfuricEthylene.getGas(12000), Materials.Ethylene.getGas(12000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 2), 160); + + //Polyethylen production, Oxygen/Titanium -> +50% Polyethylene each + GT_Values.RA.addChemicalRecipe(ItemList.Cell_Air.get(1, new Object[0]), ItemList.Circuit_Integrated.getWithDamage(0, 1, new Object[0]), Materials.Ethylene.getGas(144), Materials.Plastic.getMolten(144), ItemList.Cell_Empty.get(2, new Object[0]), 160); + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1), ItemList.Circuit_Integrated.getWithDamage(0, 1, new Object[0]), Materials.Ethylene.getGas(144), Materials.Plastic.getMolten(216), ItemList.Cell_Empty.get(2, new Object[0]), 160); + GT_Values.RA.addChemicalRecipe(ItemList.Cell_Air.get(12, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Titanium, 1), Materials.Ethylene.getGas(1728), Materials.Plastic.getMolten(2592), ItemList.Cell_Empty.get(12, new Object[0]), 640); + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 12), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Titanium, 1), Materials.Ethylene.getGas(1728), Materials.Plastic.getMolten(3456), ItemList.Cell_Empty.get(12, new Object[0]), 640); + + } public void addPotionRecipes(String aName,ItemStack aItem){ 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 54d0da5477..02af0d9780 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 @@ -429,6 +429,8 @@ public class GT_Loader_Item_Block_And_Fluid GT_Mod.gregtechproxy.addFluid("liquid_cracked_light_fuel", "Cracked Light Fuel", Materials.CrackedLightFuel, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.CrackedLightFuel, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
GT_Mod.gregtechproxy.addFluid("liquid_cracked_heavy_fuel", "Cracked Heavy Fuel", Materials.CrackedHeavyFuel, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.CrackedHeavyFuel, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ GT_Mod.gregtechproxy.addFluid("charcoal_byproducts", "molten.autogenerated", "Charcoal Byproducts", Materials.CharcoalByproducts, Materials.CharcoalByproducts.mRGBa, 2, 775, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.CharcoalByproducts, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+
GT_Mod.gregtechproxy.addFluid("UUAmplifier", "UU Amplifier", Materials.UUAmplifier, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.UUAmplifier, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
GT_Mod.gregtechproxy.addFluid("Chlorine", "Chlorine", Materials.Chlorine, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Chlorine, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
GT_Mod.gregtechproxy.addFluid("Mercury", "Mercury", Materials.Mercury, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Mercury, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
@@ -491,6 +493,12 @@ public class GT_Loader_Item_Block_And_Fluid if (tMaterial.mElement != null) {
GT_Mod.gregtechproxy.addAutogeneratedPlasmaFluid(tMaterial);
}
+ if ((tMaterial.mTypes & 256) != 0) {
+ GT_Mod.gregtechproxy.addAutoGeneratedCorrespondingFluid(tMaterial);
+ }
+ if ((tMaterial.mTypes & 512) != 0) {
+ GT_Mod.gregtechproxy.addAutoGeneratedCorrespondingGas(tMaterial);
+ }
}
GT_Mod.gregtechproxy.addFluid("potion.awkward", "Awkward Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16), ItemList.Bottle_Empty.get(1L, new Object[0]), 250);
GT_Mod.gregtechproxy.addFluid("potion.thick", "Thick Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 32), ItemList.Bottle_Empty.get(1L, new Object[0]), 250);
@@ -555,7 +563,7 @@ public class GT_Loader_Item_Block_And_Fluid GT_Mod.gregtechproxy.addFluid("potion.purpledrink", "Purple Drink", null, 1, 275, ItemList.Bottle_Purple_Drink.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250);
GT_Mod.gregtechproxy.addFluid("potion.grapejuice", "Grape Juice", null, 1, 295, ItemList.Bottle_Grape_Juice.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250);
GT_Mod.gregtechproxy.addFluid("potion.wine", "Wine", null, 1, 295, ItemList.Bottle_Wine.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250);
- GT_Mod.gregtechproxy.addFluid("potion.vinegar", "Vinegar", null, 1, 295, ItemList.Bottle_Vinegar.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250);
+ GT_Mod.gregtechproxy.addFluid("potion.vinegar", "Vinegar", Materials.Vinegar, 1, 295, ItemList.Bottle_Vinegar.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250);
GT_Mod.gregtechproxy.addFluid("potion.potatojuice", "Potato Juice", null, 1, 295, ItemList.Bottle_Potato_Juice.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250);
GT_Mod.gregtechproxy.addFluid("potion.vodka", "Vodka", null, 1, 275, ItemList.Bottle_Vodka.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250);
GT_Mod.gregtechproxy.addFluid("potion.leninade", "Leninade", null, 1, 275, ItemList.Bottle_Leninade.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250);
diff --git a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java index 030a9ad06a..193e8432d1 100644 --- a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java +++ b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java @@ -215,7 +215,8 @@ public class GT_NEI_DefaultHandler }
}
if (tDuration > 0) {
- drawText(10, 113, "Time: " + (tDuration < 20 ? "< 1" : Integer.valueOf(tDuration / 20)) + " secs", -16777216);
+// drawText(10, 113, "Time: " + (tDuration < 20 ? "< 1" : Integer.valueOf(tDuration / 20)) + " secs", -16777216);
+ drawText(10, 113, String.format("Time: %.2f secs", 0.05 * tDuration), -16777216);
}
int tSpecial = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue;
if (tSpecial == -100 && GT_Mod.gregtechproxy.mLowGravProcessing) {
|