diff options
author | Jordan Byrne <draknyte1@hotmail.com> | 2018-03-20 22:09:51 +1000 |
---|---|---|
committer | Jordan Byrne <draknyte1@hotmail.com> | 2018-03-20 22:09:51 +1000 |
commit | 7c062467bc6c34a5e442392cca4018cf725f811f (patch) | |
tree | a44a09ac2abe65849ac48f3fd04859fdb5edb62f /src/Java/gtPlusPlus/core/util/minecraft | |
parent | 769b7f51c217f57f6b4c9ef716bd9761f036c861 (diff) | |
download | GT5-Unofficial-7c062467bc6c34a5e442392cca4018cf725f811f.tar.gz GT5-Unofficial-7c062467bc6c34a5e442392cca4018cf725f811f.tar.bz2 GT5-Unofficial-7c062467bc6c34a5e442392cca4018cf725f811f.zip |
$ Fixed another instance of things being cached when invalid.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util/minecraft')
-rw-r--r-- | src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java index ffde242f7d..5eaf84d107 100644 --- a/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java +++ b/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java @@ -266,11 +266,11 @@ public class ItemUtils { mTemp = oredictName.replace("VanadiumSteel", "StainlessSteel"); } //Use Cache - if (mOreDictCache.containsKey(mTemp) && mOreDictCache.get(mTemp) != null) { + if (mOreDictCache.containsKey(mTemp) && mOreDictCache.get(mTemp) != null && mOreDictCache.get(mTemp).getItem() != ModItems.AAA_Broken) { //Logger.INFO("[ODC] Returning mOreDictCache value."); return getCachedValue(mTemp, amount); } - else if (mDustCache.containsKey(oredictName) && mDustCache.get(mTemp) != null) { + else if (mDustCache.containsKey(oredictName) && mDustCache.get(mTemp) != null && mOreDictCache.get(mTemp).getItem() != ModItems.AAA_Broken) { //Logger.INFO("[ODC] Returning mDustCache value."); return getSimpleStack(mDustCache.get(oredictName), amount); } @@ -280,7 +280,9 @@ public class ItemUtils { if (!oreDictList.isEmpty()){ final ItemStack returnValue = oreDictList.get(0).copy(); returnValue.stackSize = amount; - setCachedValue(mTemp, returnValue); + if (returnValue.getItem() != ModItems.AAA_Broken) { + setCachedValue(mTemp, returnValue); + } //Logger.INFO("[ODC] Setting and Returning mOreDictCache value."); return returnValue; } |