aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/metatileentity/implementations
diff options
context:
space:
mode:
authorSampsa <69092953+S4mpsa@users.noreply.github.com>2024-07-29 23:50:33 +0300
committerGitHub <noreply@github.com>2024-07-29 23:50:33 +0300
commitbbe59c0de8cc6a65369671789123319354148347 (patch)
tree3d1c984857f6345d356c0072d2b0d15f39986a45 /src/main/java/gregtech/api/metatileentity/implementations
parent078a7800baa7ad01f268f53363ced60034811948 (diff)
downloadGT5-Unofficial-bbe59c0de8cc6a65369671789123319354148347.tar.gz
GT5-Unofficial-bbe59c0de8cc6a65369671789123319354148347.tar.bz2
GT5-Unofficial-bbe59c0de8cc6a65369671789123319354148347.zip
Optimize recipe check forcing and add a button to enable/disable (#2785)
Disable expecited recipe check by default and add a button to enable behavior + optimize
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity/implementations')
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java5
1 files changed, 4 insertions, 1 deletions
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 f0f8c9f806..31052f8b8e 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
@@ -1605,7 +1605,10 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity
return mDualInputHatches.add(hatch);
}
if (aMetaTileEntity instanceof ISmartInputHatch hatch) {
- mSmartInputHatches.add(hatch);
+ // Only add them to be iterated if enabled for performance reasons
+ if (hatch.doFastRecipeCheck()) {
+ mSmartInputHatches.add(hatch);
+ }
}
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
setHatchRecipeMap((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);