aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/metatileentity/implementations
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/main/java/gregtech/api/metatileentity/implementations
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/main/java/gregtech/api/metatileentity/implementations')
-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
2 files changed, 8 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);