aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxim <maxim235@gmx.de>2023-07-20 23:42:39 +0200
committerGitHub <noreply@github.com>2023-07-20 23:42:39 +0200
commitb2eb57f4794e45f513eedd54e04cef9183b38144 (patch)
tree6762a2aed1fdedcdade209fc405856904b315ff0 /src
parent637ed99e69adc95d6f830647cc0aaeaadbcd3a15 (diff)
downloadGT5-Unofficial-b2eb57f4794e45f513eedd54e04cef9183b38144.tar.gz
GT5-Unofficial-b2eb57f4794e45f513eedd54e04cef9183b38144.tar.bz2
GT5-Unofficial-b2eb57f4794e45f513eedd54e04cef9183b38144.zip
Fix PA destroying itself (#2159)
Diffstat (limited to 'src')
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ExtendedPowerMultiBlockBase.java4
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java8
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java5
3 files changed, 13 insertions, 4 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ExtendedPowerMultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ExtendedPowerMultiBlockBase.java
index c5c07e5710..01494828b9 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ExtendedPowerMultiBlockBase.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ExtendedPowerMultiBlockBase.java
@@ -153,7 +153,7 @@ public abstract class GT_MetaTileEntity_ExtendedPowerMultiBlockBase<T extends GT
inputItems.add(stored);
}
}
- if (getControllerSlot() != null) {
+ if (getControllerSlot() != null && canUseControllerSlotForRecipe()) {
inputItems.add(getControllerSlot());
}
processingLogic.setInputItems(inputItems.toArray(new ItemStack[0]));
@@ -162,7 +162,7 @@ public abstract class GT_MetaTileEntity_ExtendedPowerMultiBlockBase<T extends GT
}
} else {
List<ItemStack> inputItems = getStoredInputs();
- if (getControllerSlot() != null) {
+ if (getControllerSlot() != null && canUseControllerSlotForRecipe()) {
inputItems.add(getControllerSlot());
}
processingLogic.setInputItems(inputItems);
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
index d0cc1d3d94..6578c82c30 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
@@ -703,7 +703,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity
inputItems.add(stored);
}
}
- if (getControllerSlot() != null) {
+ if (getControllerSlot() != null && canUseControllerSlotForRecipe()) {
inputItems.add(getControllerSlot());
}
processingLogic.setInputItems(inputItems.toArray(new ItemStack[0]));
@@ -712,7 +712,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity
}
} else {
List<ItemStack> inputItems = getStoredInputs();
- if (getControllerSlot() != null) {
+ if (getControllerSlot() != null && canUseControllerSlotForRecipe()) {
inputItems.add(getControllerSlot());
}
processingLogic.setInputItems(inputItems);
@@ -743,6 +743,10 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity
return result;
}
+ protected boolean canUseControllerSlotForRecipe() {
+ return true;
+ }
+
protected void setupProcessingLogic(ProcessingLogic logic) {
logic.clear();
logic.setMachine(this);
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
index d063a57aec..8d3504a1d7 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
@@ -269,6 +269,11 @@ public class GT_MetaTileEntity_ProcessingArray extends
}
@Override
+ protected boolean canUseControllerSlotForRecipe() {
+ return false;
+ }
+
+ @Override
protected void setProcessingLogicPower(ProcessingLogic logic) {
GT_Recipe_Map recipeMap = getRecipeMap();
logic.setAvailableVoltage(GT_Values.V[tTier] * (recipeMap != null ? recipeMap.mAmperage : 1));