aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2021-12-19 17:51:55 +0000
committerGitHub <noreply@github.com>2021-12-19 17:51:55 +0000
commit8260839312546c53d1ab94f2ee4e87ae4e5f0b9f (patch)
treee668043316debaeb58b46f1d364fac73e9254501 /src/main/java/gtPlusPlus/xmod
parent615dd5ae99d6703efef551fd34e2092b1b8a4496 (diff)
parent62676f57093ed476b9c378615560749c6e0136e3 (diff)
downloadGT5-Unofficial-8260839312546c53d1ab94f2ee4e87ae4e5f0b9f.tar.gz
GT5-Unofficial-8260839312546c53d1ab94f2ee4e87ae4e5f0b9f.tar.bz2
GT5-Unofficial-8260839312546c53d1ab94f2ee4e87ae4e5f0b9f.zip
Merge branch 'master' into New-Multis
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java26
1 files changed, 20 insertions, 6 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java
index 42912c4fa8..4a01809ac7 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java
@@ -55,7 +55,7 @@ import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
-public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase {
+public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase<GregtechMTE_ChemicalPlant> {
private int mSolidCasingTier = 0;
private int mMachineCasingTier = 0;
@@ -568,10 +568,18 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase {
}
@Override
- public boolean checkRecipe(final ItemStack aStack) {
+ public boolean checkRecipe(final ItemStack aStack) {
return checkRecipeGeneric(getMaxParallelRecipes(), getEuDiscountForParallelism(), getSpeedBonus());
}
+ @Override
+ public boolean checkRecipeGeneric(int aMaxParallelRecipes, int aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) {
+ ArrayList<ItemStack> tItems = getStoredInputs();
+ ArrayList<FluidStack> tFluids = getStoredFluids();
+ ItemStack[] tItemInputs = tItems.toArray(new ItemStack[tItems.size()]);
+ FluidStack[] tFluidInputs = tFluids.toArray(new FluidStack[tFluids.size()]);
+ return checkRecipeGeneric(tItemInputs, tFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll);
+ }
@Override
public boolean checkRecipeGeneric(
@@ -586,7 +594,7 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase {
this.mMaxProgresstime = 0;
this.mOutputItems = new ItemStack[]{};
this.mOutputFluids = new FluidStack[]{};
-
+
long tVoltage = getMaxInputVoltage();
byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
long tEnergy = getMaxInputEnergy();
@@ -1035,12 +1043,18 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase {
@Override
public ArrayList<ItemStack> getStoredInputs() {
ArrayList<ItemStack> tItems = super.getStoredInputs();
+ if (this.hasSlotInGUI() && this.getGUIItemStack() != null) {
+ tItems.add(this.getGUIItemStack());
+ }
for (GT_MetaTileEntity_Hatch_Catalysts tHatch : mCatalystBuses) {
tHatch.mRecipeMap = getRecipeMap();
- if (isValidMetaTileEntity(tHatch)) {
- tItems.addAll(tHatch.getContentUsageSlots());
+ if (isValidMetaTileEntity(tHatch)) {
+ AutoMap<ItemStack> aHatchContent = tHatch.getContentUsageSlots();
+ if (!aHatchContent.isEmpty()) {
+ tItems.addAll(aHatchContent);
+ }
}
- }
+ }
return tItems;
}
}