diff options
author | Maxim <maxim235@gmx.de> | 2023-07-23 09:59:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-23 09:59:37 +0200 |
commit | c5fbae0cd1f42167a7b43414f316052cce520d6e (patch) | |
tree | bd93bb3f9bc0e812eebff20e9b075120a6ee5a4b /src/main | |
parent | 93685aa6b02a69420bae9c988a427529a7aaffcc (diff) | |
download | GT5-Unofficial-c5fbae0cd1f42167a7b43414f316052cce520d6e.tar.gz GT5-Unofficial-c5fbae0cd1f42167a7b43414f316052cce520d6e.tar.bz2 GT5-Unofficial-c5fbae0cd1f42167a7b43414f316052cce520d6e.zip |
Cache old recipe map and delete lastRecipe if it changes (#2167)
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/gregtech/api/logic/ProcessingLogic.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/gregtech/api/logic/ProcessingLogic.java b/src/main/java/gregtech/api/logic/ProcessingLogic.java index 8a902e4fb5..894bd3f946 100644 --- a/src/main/java/gregtech/api/logic/ProcessingLogic.java +++ b/src/main/java/gregtech/api/logic/ProcessingLogic.java @@ -30,6 +30,7 @@ public class ProcessingLogic { protected IRecipeLockable recipeLockableMachine; protected Supplier<GT_Recipe_Map> recipeMapSupplier; protected GT_Recipe lastRecipe; + protected GT_Recipe_Map lastRecipeMap; protected ItemStack specialSlotItem; protected ItemStack[] inputItems; protected ItemStack[] outputItems; @@ -256,6 +257,10 @@ public class ProcessingLogic { } else { recipeMap = recipeMapSupplier.get(); } + if (lastRecipeMap != recipeMap) { + lastRecipe = null; + lastRecipeMap = recipeMap; + } if (maxParallelSupplier != null) { maxParallel = maxParallelSupplier.get(); |