aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/tileentities/machines/multi
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/common/tileentities/machines/multi')
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java41
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java64
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java6
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java4
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java36
8 files changed, 121 insertions, 45 deletions
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java
index 52af865d0d..dd6d9b0f4a 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java
@@ -24,6 +24,8 @@ import net.minecraftforge.fluids.FluidStack;
public class GT_MetaTileEntity_AssemblyLine
extends GT_MetaTileEntity_MultiBlockBase {
+ //public ArrayList<GT_MetaTileEntity_Hatch_DataAccess> mDataAccessHatches = new ArrayList<GT_MetaTileEntity_Hatch_DataAccess>();
+
public GT_MetaTileEntity_AssemblyLine(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
}
@@ -315,25 +317,7 @@ public class GT_MetaTileEntity_AssemblyLine
}
return false;
}
-
- public int getMaxEfficiency(ItemStack aStack) {
- return 10000;
- }
-
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
- }
-
- public int getDamageToComponent(ItemStack aStack) {
- return 0;
- }
-
- public boolean explodesOnComponentBreak(ItemStack aStack) {
- return false;
- }
-
- public ArrayList<GT_MetaTileEntity_Hatch_DataAccess> mDataAccessHatches = new ArrayList<GT_MetaTileEntity_Hatch_DataAccess>();
-
+
/**
* @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb
*/
@@ -343,7 +327,7 @@ public class GT_MetaTileEntity_AssemblyLine
if ((state & 4) != 0 && ItemList.Tool_DataOrb.isStackEqual(aStack, false, true)) return true;
return false;
}
-
+
/**
* @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb
*/
@@ -369,10 +353,25 @@ public class GT_MetaTileEntity_AssemblyLine
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity == null) return false;
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_DataAccess) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
+ ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
return mDataAccessHatches.add((GT_MetaTileEntity_Hatch_DataAccess) aMetaTileEntity);
}
return false;
}
+ public int getMaxEfficiency(ItemStack aStack) {
+ return 10000;
+ }
+
+ public int getPollutionPerTick(ItemStack aStack) {
+ return 0;
+ }
+
+ public int getDamageToComponent(ItemStack aStack) {
+ return 0;
+ }
+
+ public boolean explodesOnComponentBreak(ItemStack aStack) {
+ return false;
+ }
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java
index ff382c369d..826cab56ab 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java
@@ -154,7 +154,7 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock
if ((tTileEntity != null) && (tTileEntity.getMetaTileEntity() != null)) {
if ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Dynamo)) {
this.mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo) tTileEntity.getMetaTileEntity());
- ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = getCasingTextureIndex();
+ ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).updateTexture(getCasingTextureIndex());
} else {
return false;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java
index 3823e38a0b..e62977125e 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java
@@ -1,13 +1,17 @@
package gregtech.common.tileentities.machines.multi;
import gregtech.api.GregTech_API;
+import gregtech.api.enums.Materials;
import gregtech.api.enums.Textures;
import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.InventoryPlayer;
@@ -20,6 +24,9 @@ import java.util.ArrayList;
public class GT_MetaTileEntity_ElectricBlastFurnace
extends GT_MetaTileEntity_MultiBlockBase {
private int mHeatingCapacity = 0;
+ private int controllerY;
+ private FluidStack[] pollutionFluidStacks = new FluidStack[]{Materials.CarbonDioxide.getGas(1000),
+ Materials.CarbonMonoxide.getGas(1000), Materials.SulfurDioxide.getGas(1000)};
public GT_MetaTileEntity_ElectricBlastFurnace(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
@@ -43,6 +50,8 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
"1x Energy Hatch (Any bottom layer casing)",
"1x Maintenance Hatch (Any bottom layer casing)",
"1x Muffler Hatch (Top middle)",
+ "1x Output Hatch to recover CO2/CO/SO2 (optional, any top layer casing),",
+ " Recovery scales with Muffler Hatch tier",
"Heat Proof Machine Casings for the rest",
"Each 900K over the min. Heat Capacity grants 5% speedup (multiplicatively)",
"Each 1800K over the min. Heat Capacity allows for one upgraded overclock",
@@ -136,6 +145,7 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
}
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0), tRecipe.getOutput(1)};
+ this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)};
updateSlots();
return true;
}
@@ -144,6 +154,7 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
}
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ controllerY = aBaseMetaTileEntity.getYCoord();
int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
@@ -199,11 +210,13 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 1, zDir + j) != tUsedMeta) {
return false;
}
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 3, zDir + j) != GregTech_API.sBlockCasings1) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 3, zDir + j) != 11) {
- return false;
+ if (!addOutputToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 3, zDir + j), 11)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 3, zDir + j) != GregTech_API.sBlockCasings1) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 3, zDir + j) != 11) {
+ return false;
+ }
}
}
}
@@ -263,4 +276,45 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
}
}
}
+
+ @Override
+ public boolean addOutput(FluidStack aLiquid) {
+ if (aLiquid == null) return false;
+ int targetHeight;
+ FluidStack tLiquid = aLiquid.copy();
+ boolean isOutputPollution = false;
+ for (FluidStack pollutionFluidStack : pollutionFluidStacks) {
+ if (tLiquid.isFluidEqual(pollutionFluidStack)) {
+ isOutputPollution = true;
+ break;
+ }
+ }
+ if (isOutputPollution) {
+ targetHeight = this.controllerY + 3;
+ int pollutionReduction = 0;
+ for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) {
+ if (isValidMetaTileEntity(tHatch)) {
+ pollutionReduction = 100 - tHatch.calculatePollutionReduction(100);
+ break;
+ }
+ }
+ tLiquid.amount = tLiquid.amount * (pollutionReduction + 5) / 100;
+ } else {
+ targetHeight = this.controllerY;
+ }
+ for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) {
+ if (isValidMetaTileEntity(tHatch) && GT_ModHandler.isSteam(aLiquid) ? tHatch.outputsSteam() : tHatch.outputsLiquids()) {
+ if (tHatch.getBaseMetaTileEntity().getYCoord() == targetHeight) {
+ int tAmount = tHatch.fill(tLiquid, false);
+ if (tAmount >= tLiquid.amount) {
+ return tHatch.fill(tLiquid, true) >= tLiquid.amount;
+ } else if (tAmount > 0) {
+ tLiquid.amount = tLiquid.amount - tHatch.fill(tLiquid, true);
+ }
+ }
+ }
+ }
+ return false;
+ }
+
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
index 82384bd054..92301a7e4f 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
@@ -279,17 +279,17 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity
public boolean turnCasingActive(boolean status) {
if (this.mEnergyHatches != null) {
for (GT_MetaTileEntity_Hatch_Energy hatch : this.mEnergyHatches) {
- hatch.mMachineBlock = status ? (byte) 52 : (byte) 53;
+ hatch.updateTexture(status ? 52 : 53);
}
}
if (this.mOutputHatches != null) {
for (GT_MetaTileEntity_Hatch_Output hatch : this.mOutputHatches) {
- hatch.mMachineBlock = status ? (byte) 52 : (byte) 53;
+ hatch.updateTexture(status ? 52 : 53);
}
}
if (this.mInputHatches != null) {
for (GT_MetaTileEntity_Hatch_Input hatch : this.mInputHatches) {
- hatch.mMachineBlock = status ? (byte) 52 : (byte) 53;
+ hatch.updateTexture(status ? 52 : 53);
}
}
return true;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java
index 8bf054d8d7..b258a64299 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java
@@ -224,7 +224,7 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_MultiBloc
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity == null) return false;
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
+ ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
mOutputColdFluidHatch = (GT_MetaTileEntity_Hatch_Output) aMetaTileEntity;
return true;
}
@@ -236,7 +236,7 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_MultiBloc
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity == null) return false;
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
+ ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mRecipeMap = getRecipeMap();
mInputHotFluidHatch = (GT_MetaTileEntity_Hatch_Input) aMetaTileEntity;
return true;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java
index 18cd5bd74a..52120d2e90 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java
@@ -2,6 +2,7 @@ package gregtech.common.tileentities.machines.multi;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures;
+import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -10,6 +11,7 @@ import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import net.minecraft.block.Block;
+import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
@@ -62,6 +64,11 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu
}
return new ITexture[] { Textures.BlockIcons.CASING_BLOCKS[CASING_INDEX] };
}
+
+ @Override
+ public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeChemicalReactor.png");
+ }
@Override
public boolean isCorrectMachinePart(ItemStack aStack) {
@@ -86,6 +93,7 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu
}
}
}
+ tInputList.add(mInventory[1]);
ItemStack[] inputs = tInputList.toArray(new ItemStack[tInputList.size()]);
ArrayList<FluidStack> tFluidList = getStoredFluids();
@@ -110,7 +118,7 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu
long voltage = getMaxInputVoltage();
byte tier = (byte) Math.max(1, GT_Utility.getTier(voltage));
GT_Recipe recipe = GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.findRecipe(getBaseMetaTileEntity(), false,
- gregtech.api.enums.GT_Values.V[tier], fluids, inputs);
+ false, gregtech.api.enums.GT_Values.V[tier], fluids, inputs);
if (recipe != null && recipe.isRecipeInputEqual(true, fluids, inputs)) {
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
@@ -131,6 +139,7 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu
this.mMaxProgresstime = maxProgresstime;
this.mOutputItems = recipe.mOutputs;
this.mOutputFluids = recipe.mFluidOutputs;
+ this.updateSlots();
return true;
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java
index 74daf36a32..9806f33967 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java
@@ -90,7 +90,7 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M
if ((tTileEntity != null) && (tTileEntity.getMetaTileEntity() != null)) {
if ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Dynamo)) {
this.mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo) tTileEntity.getMetaTileEntity());
- ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = getCasingTextureIndex();
+ ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).updateTexture(getCasingTextureIndex());
} else {
return false;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
index 26bc2acd39..25fa0b9042 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
@@ -19,6 +19,8 @@ import java.util.ArrayList;
public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlockBase {
+ private int coilMetaID;
+
public GT_MetaTileEntity_PyrolyseOven(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
}
@@ -32,22 +34,25 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock
"Controller Block for the Pyrolyse Oven",
"Industrial Charcoal producer and Oil from Plants",
"Size(WxHxD): 5x4x5, Controller (Bottom center)",
- "3x1x3 of Kanthal Coil Blocks (At the center of the bottom layer)",
+ "3x1x3 of Coil Blocks (At the center of the bottom layer)",
"1x Input Hatch/Bus (Centered 3x1x3 area in Top layer)",
"1x Output Hatch/Bus (Any bottom layer casing)",
"1x Maintenance Hatch (Any bottom layer casing)",
"1x Muffler Hatch (Centered 3x1x3 area in Top layer)",
"1x Energy Hatch (Any bottom layer casing)",
"ULV Machine Casings for the rest (60 at least!)",
+ "Processing speed scales linearly with Coil tier:",
+ "CuNi: 50%, FeAlCr: 100%, Ni4Cr: 150%, Fe50CW: 200%, etc.",
+ "EU/t is not affected by Coil tier",
"Causes " + 20 * getPollutionPerTick(null) + " Pollution per second"};
}
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[0],
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[111],
new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN)};
}
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[0]};
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[111]};
}
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
@@ -68,7 +73,6 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock
this.mEfficiencyIncrease = 10000;
this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = tRecipe.mDuration;
if (tRecipe.mEUt <= 16) {
this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1));
@@ -83,6 +87,7 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock
if (this.mEUt > 0) {
this.mEUt = (-this.mEUt);
}
+ this.mMaxProgresstime = mMaxProgresstime * 2 / (1 + coilMetaID);
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
if (tRecipe.mOutputs.length > 0) this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)};
if (tRecipe.mFluidOutputs.length > 0)
@@ -100,17 +105,26 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock
int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 2;
int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 2;
replaceDeprecatedCoils(aBaseMetaTileEntity);
+ boolean firstCoil = true;
for (int i = -2; i < 3; i++) {
for (int j = -2; j < 3; j++) {
for (int h = 0; h < 4; h++) {
IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
- if ((i != -2 && i != 2) && (j != -2 && j != 2)) {// innerer 3x3 ohne h�he
- if (h == 0) {// innen boden (kantal coils)
+ if ((i != -2 && i != 2) && (j != -2 && j != 2)) {// innerer 3x3 ohne hoehe
+ if (h == 0) {// innen boden (kanthal coils)
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != GregTech_API.sBlockCasings5) {
return false;
}
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 1) {
+ int metaID = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j);
+ if (metaID > 6) {
return false;
+ } else {
+ if (firstCoil) {
+ this.coilMetaID = metaID;
+ firstCoil = false;
+ } else if (metaID != this.coilMetaID) {
+ return false;
+ }
}
} else if (h == 3) {// innen decke (ulv casings + input + muffler)
if ((!addInputToMachineList(tTileEntity, 111)) && (!addMufflerToMachineList(tTileEntity, 111))) {
@@ -126,8 +140,8 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock
return false;
}
}
- } else {// Au�erer 5x5 ohne h�he
- if (h == 0) {// au�en boden (controller, output, energy, maintainance, rest ulv casings)
+ } else {// Aeusserer 5x5 ohne hoehe
+ if (h == 0) {// aussen boden (controller, output, energy, maintainance, rest ulv casings)
if ((!addMaintenanceToMachineList(tTileEntity, 111)) && (!addOutputToMachineList(tTileEntity, 111)) && (!addEnergyInputToMachineList(tTileEntity, 111))) {
if ((xDir + i != 0) || (zDir + j != 0)) {//no controller
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != GregTech_API.sBlockCasings1) {
@@ -138,7 +152,7 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock
}
}
}
- } else {// au�en �ber boden (ulv casings)
+ } else {// aussen ueber boden (ulv casings)
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != GregTech_API.sBlockCasings1) {
return false;
}
@@ -165,7 +179,7 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock
@Override
public int getPollutionPerTick(ItemStack aStack) {
- return 20;
+ return 10;
}
@Override