From 9a533aa0741a22491a8b83bcca8b2e8b1d5b9b61 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:49:53 +0100 Subject: [PATCH] Avoid caching the same recipe map more than once. --- .../java/gregtech/api/util/GT_ProcessingArray_Manager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/gregtech/api/util/GT_ProcessingArray_Manager.java b/src/main/java/gregtech/api/util/GT_ProcessingArray_Manager.java index 0d2c407e..d048f1f8 100644 --- a/src/main/java/gregtech/api/util/GT_ProcessingArray_Manager.java +++ b/src/main/java/gregtech/api/util/GT_ProcessingArray_Manager.java @@ -18,7 +18,9 @@ public class GT_ProcessingArray_Manager { } String aMapNameKey = aMap.mUnlocalizedName; mMetaKeyMap.put(aMeta, aMapNameKey); - mRecipeCache.put(aMapNameKey, aMap); + if (!mRecipeCache.containsKey(aMapNameKey)) { + mRecipeCache.put(aMapNameKey, aMap); + } return true; }