aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2021-12-20 18:01:07 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2021-12-20 18:01:07 +0000
commit2dde5446791fab35321a1d18fb7ab017ef7872e1 (patch)
treed49c3d571e8908e5c545e59d556e37e3ab22356f /src/main/java/gtPlusPlus/xmod
parent849ae606a186ff5c1b7e9411bd2ed3589dcb06b5 (diff)
parent8260839312546c53d1ab94f2ee4e87ae4e5f0b9f (diff)
downloadGT5-Unofficial-2dde5446791fab35321a1d18fb7ab017ef7872e1.tar.gz
GT5-Unofficial-2dde5446791fab35321a1d18fb7ab017ef7872e1.tar.bz2
GT5-Unofficial-2dde5446791fab35321a1d18fb7ab017ef7872e1.zip
Merge branch 'New-Multis' of https://github.com/GTNewHorizons/GTplusplus 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;
}
}