Rebalance oil processing and improve pipe covering

This commit is contained in:
Blood-Asp 2016-03-27 16:43:03 +02:00
parent e56a98af45
commit 44f3e89bdf
6 changed files with 51 additions and 23 deletions

View file

@ -517,14 +517,14 @@ public enum Materials implements IColorModulationContainer, ISubTagContainer {
NatruralGas ( 733, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 255, 255, 255, 0, "Natural Gas" , 1, 15, -1, 0, false, false, 3, 1, 1, Dyes.dyeWhite ),
SulfuricGas ( 734, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 255, 255, 255, 0, "Sulfuric Gas" , 1, 20, -1, 0, false, false, 3, 1, 1, Dyes.dyeWhite ),
Gas ( 735, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 255, 255, 255, 0, "Refinery Gas" , 1, 35, -1, 0, false, false, 3, 1, 1, Dyes.dyeWhite ),
SulfuricNaphtha ( 736, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "Sulfuric Naphtha" , 0, 32, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow ),
Gas ( 735, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 255, 255, 255, 0, "Refinery Gas" , 1, 128, -1, 0, false, false, 3, 1, 1, Dyes.dyeWhite ),
SulfuricNaphtha ( 736, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "Sulfuric Naphtha" , 1, 32, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow ),
SulfuricLightFuel ( 737, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "Sulfuric Light Fuel" , 0, 32, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow ),
SulfuricHeavyFuel ( 738, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "Sulfuric Heavy Fuel" , 3, 32, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack ),
Naphtha ( 739, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "Naphtha" , 0, 128, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow ),
Naphtha ( 739, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "Naphtha" , 1, 256, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow ),
LightFuel ( 740, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "Light Fuel" , 0, 256, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow ),
HeavyFuel ( 741, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "Heavy Fuel" , 3, 160, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack ),
LPG ( 742, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "LPG" , 1, 80, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow ),
HeavyFuel ( 741, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "Heavy Fuel" , 3, 192, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack ),
LPG ( 742, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "LPG" , 1, 256, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow ),
CrackedLightFuel ( 743, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "Cracked Light Fuel" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow ),
CrackedHeavyFuel ( 744, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "Cracked Heavy Fuel" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack ),

View file

@ -162,6 +162,9 @@ public abstract class MetaPipeEntity implements IMetaTileEntity {
if (aSide < 6 && mBaseMetaTileEntity.getCoverIDAtSide(aSide) > 0) {
tCovered = true;
}
if((mConnections & (byte)(Math.pow(2, aSide))) != 0){
tCovered = true;
}
//System.out.println("Cover: "+mBaseMetaTileEntity.getCoverIDAtSide(aSide));
//toDo: filter cover ids that actually protect against temperature (rubber/plastic maybe?)
return tCovered;

View file

@ -25,6 +25,8 @@ import net.minecraftforge.fluids.FluidStack;
import java.util.ArrayList;
import org.apache.commons.lang3.ArrayUtils;
import static gregtech.api.enums.GT_Values.V;
public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {

View file

@ -1,5 +1,10 @@
package gregtech.common.tileentities.machines.multi;
import java.util.ArrayList;
import java.util.Arrays;
import org.apache.commons.lang3.ArrayUtils;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures;
import gregtech.api.gui.GT_GUIContainer_MultiMachine;
@ -69,12 +74,27 @@ public class GT_MetaTileEntity_DistillationTower
public boolean checkRecipe(ItemStack aStack) {
ArrayList<FluidStack> tFluidList = getStoredFluids();
for (int i = 0; i < tFluidList.size() - 1; i++) {
for (int j = i + 1; j < tFluidList.size(); j++) {
if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), (FluidStack) tFluidList.get(j))) {
if (((FluidStack) tFluidList.get(i)).amount >= ((FluidStack) tFluidList.get(j)).amount) {
tFluidList.remove(j--);
} else {
tFluidList.remove(i--);
break;
}
}
}
}
long tVoltage = getMaxInputVoltage();
byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
if (this.mInputHatches.size() > 0 && this.mInputHatches.get(0) != null && this.mInputHatches.get(0).mFluid != null && this.mInputHatches.get(0).mFluid.amount > 0) {
GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sDistillationRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], new FluidStack[]{this.mInputHatches.get(0).mFluid}, new ItemStack[]{});
FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tFluidList.size()]), 0, 1);
if (tFluids.length > 0) {
GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sDistillationRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, new ItemStack[]{});
if (tRecipe != null) {
if (tRecipe.isRecipeInputEqual(true, new FluidStack[]{this.mInputHatches.get(0).mFluid}, new ItemStack[]{})) {
if (tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[]{})) {
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
if (tRecipe.mEUt <= 16) {
@ -94,6 +114,7 @@ public class GT_MetaTileEntity_DistillationTower
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)};
this.mOutputFluids = tRecipe.mFluidOutputs;
ArrayUtils.reverse(mOutputFluids);
updateSlots();
return true;
}
@ -130,7 +151,7 @@ public class GT_MetaTileEntity_DistillationTower
}
}
}
if (this.mInputHatches.size() != 1 || this.mOutputBusses.size() != 1 || this.mInputBusses.size() != 0 || this.mOutputHatches.size() != 5) {
if (this.mOutputBusses.size() != 1 || this.mInputBusses.size() != 0 || this.mOutputHatches.size() != 5) {
return false;
}
int height = this.getBaseMetaTileEntity().getYCoord();

View file

@ -41,6 +41,7 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBa
"2 Blocks left Input Hatch and 8 Casings",
"2 Blocks right Output Hatch and 8 Casings",
"beween coils: Controller, second input Hatch",
"Add steam for lower energy cost(50%) or Hydrogen for bonus output(30%)",
"Maintainance Hatch and Energy Hatch"};
}
@ -71,7 +72,7 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBa
for (FluidStack tInput2 : tInputList) {
if (tInput2.getFluid() == GT_ModHandler.getSteam(1).getFluid()) {
steam = true;
tInput2.amount -= 64;
tInput2.amount -= 128;
}
if (tInput2.getFluid() == Materials.Hydrogen.mGas) {
hydrogen = true;
@ -94,7 +95,7 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBa
this.mMaxProgresstime /= 2;
}
}
if (steam) this.mEUt = this.mEUt * 66 / 100;
if (steam) this.mEUt = this.mEUt / 2;
if (this.mEUt > 0) {
this.mEUt = (-this.mEUt);
}

View file

@ -454,18 +454,19 @@ public class GT_MachineRecipeLoader
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 2L), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Lapis, 5L), Materials.Glass.getMolten(72L), GT_ModHandler.getModItem("Forestry", "thermionicTubes", 4L, 11), 64, 32);
GT_Values.RA.addUniversalDistillationRecipe(Materials.OilLight.getFluid(150), new FluidStack[]{Materials.SulfuricGas.getGas(40), Materials.SulfuricNaphtha.getFluid(30), Materials.SulfuricLightFuel.getFluid(20), Materials.SulfuricHeavyFuel.getFluid(10)}, null, 32, 64);
GT_Values.RA.addUniversalDistillationRecipe(Materials.OilMedium.getFluid(100), new FluidStack[]{Materials.SulfuricGas.getGas(15), Materials.SulfuricNaphtha.getFluid(20), Materials.SulfuricLightFuel.getFluid(50), Materials.SulfuricHeavyFuel.getFluid(15)}, null, 32, 64);
GT_Values.RA.addUniversalDistillationRecipe(Materials.Oil.getFluid(50L), new FluidStack[]{Materials.SulfuricGas.getGas(15), Materials.SulfuricNaphtha.getFluid(20), Materials.SulfuricLightFuel.getFluid(50), Materials.SulfuricHeavyFuel.getFluid(15)}, null, 32, 64);
GT_Values.RA.addUniversalDistillationRecipe(Materials.OilLight.getFluid(150), new FluidStack[]{Materials.SulfuricGas.getGas(240), Materials.SulfuricNaphtha.getFluid(30), Materials.SulfuricLightFuel.getFluid(20), Materials.SulfuricHeavyFuel.getFluid(10)}, null, 32, 64);
GT_Values.RA.addUniversalDistillationRecipe(Materials.OilMedium.getFluid(100), new FluidStack[]{Materials.SulfuricGas.getGas(60), Materials.SulfuricNaphtha.getFluid(20), Materials.SulfuricLightFuel.getFluid(50), Materials.SulfuricHeavyFuel.getFluid(15)}, null, 32, 64);
GT_Values.RA.addUniversalDistillationRecipe(Materials.Oil.getFluid(50L), new FluidStack[]{Materials.SulfuricGas.getGas(60), Materials.SulfuricNaphtha.getFluid(20), Materials.SulfuricLightFuel.getFluid(50), Materials.SulfuricHeavyFuel.getFluid(15)}, null, 32, 64);
if (FluidRegistry.getFluid("oilgc") != null) {
GT_Values.RA.addUniversalDistillationRecipe(new FluidStack(FluidRegistry.getFluid("oilgc"), 50), new FluidStack[]{Materials.SulfuricGas.getGas(15), Materials.SulfuricNaphtha.getFluid(20), Materials.SulfuricLightFuel.getFluid(50), Materials.SulfuricHeavyFuel.getFluid(15)}, null, 32, 64);
GT_Values.RA.addUniversalDistillationRecipe(new FluidStack(FluidRegistry.getFluid("oilgc"), 50), new FluidStack[]{Materials.SulfuricGas.getGas(60), Materials.SulfuricNaphtha.getFluid(20), Materials.SulfuricLightFuel.getFluid(50), Materials.SulfuricHeavyFuel.getFluid(15)}, null, 32, 64);
}
GT_Values.RA.addUniversalDistillationRecipe(Materials.OilHeavy.getFluid(30), new FluidStack[]{Materials.SulfuricGas.getGas(5), Materials.SulfuricNaphtha.getFluid(5), Materials.SulfuricLightFuel.getFluid(15), Materials.SulfuricHeavyFuel.getFluid(75)}, null, 32, 64);
GT_Values.RA.addUniversalDistillationRecipe(Materials.CrackedLightFuel.getFluid(100), new FluidStack[]{Materials.Gas.getGas(25), Materials.Naphtha.getFluid(50), new FluidStack(ItemList.sToluene,10),Materials.HeavyFuel.getFluid(15)}, null, 32, 64);
GT_Values.RA.addUniversalDistillationRecipe(Materials.CrackedHeavyFuel.getFluid(100), new FluidStack[]{Materials.Gas.getGas(5), Materials.Naphtha.getFluid(10), Materials.LightFuel.getFluid(40), new FluidStack(ItemList.sToluene,40), Materials.Lubricant.getFluid(5)}, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.HydratedCoal, 1L), 32, 64);
GT_Values.RA.addUniversalDistillationRecipe(Materials.OilHeavy.getFluid(100), new FluidStack[]{Materials.SulfuricGas.getGas(60), Materials.SulfuricNaphtha.getFluid(15), Materials.SulfuricLightFuel.getFluid(45), Materials.SulfuricHeavyFuel.getFluid(250)}, null, 32, 192);
GT_Values.RA.addUniversalDistillationRecipe(Materials.CrackedLightFuel.getFluid(100), new FluidStack[]{Materials.Gas.getGas(240), Materials.Naphtha.getFluid(30), new FluidStack(ItemList.sToluene,10),Materials.HeavyFuel.getFluid(10)}, null, 16, 64);
GT_Values.RA.addUniversalDistillationRecipe(Materials.CrackedHeavyFuel.getFluid(100), new FluidStack[]{Materials.Gas.getGas(80), Materials.Naphtha.getFluid(10), new FluidStack(ItemList.sToluene,30), Materials.LightFuel.getFluid(40), Materials.Lubricant.getFluid(5)}, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.HydratedCoal, 1L), 16, 64);
GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 1L, new Object[0]), Materials.HeavyFuel.getFluid(5L), new FluidStack(ItemList.sToluene,2), 16, 24, false);
GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 1L, new Object[0]), Materials.HeavyFuel.getFluid(10L), new FluidStack(ItemList.sToluene,4), 16, 24, false);
GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 1L, new Object[0]), new FluidStack(ItemList.sToluene,30), Materials.LightFuel.getFluid(30L), 16, 24, false);
GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ball.get(0L, new Object[0]), new FluidStack(ItemList.sToluene,100), ItemList.GelledToluene.get(1, new Object[0]), 100, 16);
GT_Values.RA.addChemicalRecipe(ItemList.GelledToluene.get(4, new Object[0]), GT_Values.NI, Materials.SulfuricAcid.getFluid(250), GT_Values.NF, new ItemStack(Blocks.tnt,1), 200, 24);
@ -474,8 +475,8 @@ public class GT_MachineRecipeLoader
GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell,Materials.SulfuricAcid, 1), null, null, null, new FluidStack(ItemList.sNitricAcid,1000), new FluidStack(ItemList.sNitrationMixture,2000), ItemList.Cell_Empty.get(1, new Object[0]), 500, 2);
GT_Values.RA.addChemicalRecipe(ItemList.GelledToluene.get(4, new Object[0]), GT_Values.NI, new FluidStack(ItemList.sNitrationMixture,250), GT_Values.NF, GT_ModHandler.getIC2Item("industrialTnt", 1L), 80, 480);
GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 1L), ItemList.Cell_Empty.get(1, new Object[0]), Materials.NatruralGas.getGas(8000), Materials.Gas.getGas(8000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 2L), 160);
GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 1L), ItemList.Cell_Empty.get(1, new Object[0]), Materials.SulfuricGas.getGas(8000), Materials.Gas.getGas(8000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 2L), 160);
GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 1L), ItemList.Cell_Empty.get(1, new Object[0]), Materials.NatruralGas.getGas(16000), Materials.Gas.getGas(16000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 2L), 160);
GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 1L), ItemList.Cell_Empty.get(1, new Object[0]), Materials.SulfuricGas.getGas(16000), Materials.Gas.getGas(16000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 2L), 160);
GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 1L), ItemList.Cell_Empty.get(1, new Object[0]), Materials.SulfuricNaphtha.getFluid(7000), Materials.Naphtha.getFluid(7000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 2L), 160);
GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 1L), ItemList.Cell_Empty.get(1, new Object[0]), Materials.SulfuricLightFuel.getFluid(6000), Materials.LightFuel.getFluid(6000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 2L), 160);
GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 1L), ItemList.Cell_Empty.get(1, new Object[0]), Materials.SulfuricHeavyFuel.getFluid(4000), Materials.HeavyFuel.getFluid(4000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 2L), 160);
@ -497,8 +498,8 @@ public class GT_MachineRecipeLoader
GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1L), null, new FluidStack(ItemList.sEpichlorhydrin, 144), Materials.Silicone.getMolten(144), null, 240, 96);
GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Naphtha, 3L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NitrogenDioxide, 1L), new FluidStack(ItemList.sEpichlorhydrin, 144), Materials.Epoxid.getMolten(288), ItemList.Cell_Empty.get(4, new Object[0]), 240, 30);
GT_Values.RA.addCrackingRecipe(Materials.LightFuel.getFluid(64), Materials.CrackedLightFuel.getFluid(64), 16, 480);
GT_Values.RA.addCrackingRecipe(Materials.HeavyFuel.getFluid(64), Materials.CrackedHeavyFuel.getFluid(64), 16, 480);
GT_Values.RA.addCrackingRecipe(Materials.LightFuel.getFluid(128), Materials.CrackedLightFuel.getFluid(192), 16, 320);
GT_Values.RA.addCrackingRecipe(Materials.HeavyFuel.getFluid(128), Materials.CrackedHeavyFuel.getFluid(192), 16, 320);
GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), Materials.Creosote.getFluid(3L), Materials.Lubricant.getFluid(1L), 16, 24, false);
GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), Materials.SeedOil.getFluid(4L), Materials.Lubricant.getFluid(1L), 16, 24, false);