summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/bingo
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-03 03:24:50 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-03 03:24:50 +0100
commitd4ee6c0e61a2543a654ade7be19b0effe95fb8d1 (patch)
tree2ff9e1c7d7e913cfa6e01c14ff93e2fe1b712aa0 /src/main/java/at/hannibal2/skyhanni/features/bingo
parent6e36d679df0444f19a65c6c81dd26e5b344a2cd7 (diff)
downloadskyhanni-d4ee6c0e61a2543a654ade7be19b0effe95fb8d1.tar.gz
skyhanni-d4ee6c0e61a2543a654ade7be19b0effe95fb8d1.tar.bz2
skyhanni-d4ee6c0e61a2543a654ade7be19b0effe95fb8d1.zip
Increased performance and decreased ram usage.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/bingo')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt
index a2dc399d8..4428fd072 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt
@@ -11,6 +11,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.hasEnchantments
import at.hannibal2.skyhanni.utils.ItemUtils.name
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.NEUItems
+import at.hannibal2.skyhanni.utils.NEUItems.getCachedIngredients
import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimalIfNecessary
import at.hannibal2.skyhanni.utils.RenderUtils.renderStrings
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
@@ -130,7 +131,7 @@ class MinionCraftHelper {
val recipes = NEUItems.getRecipes(minion)
for (recipe in recipes) {
- for (ingredient in recipe.ingredients) {
+ for (ingredient in recipe.getCachedIngredients()) {
val ingredientInternalName = ingredient.internalItemId
if (ingredientInternalName == internalName) return true
@@ -161,7 +162,7 @@ class MinionCraftHelper {
for (recipe in NEUItems.getRecipes(internalId)) {
if (recipe !is CraftingRecipe) continue
- for (ingredient in recipe.ingredients) {
+ for (ingredient in recipe.getCachedIngredients()) {
val id = ingredient.internalItemId
if (!id.contains("_GENERATOR_") && !allIngredients.contains(id)) {
allIngredients.add(id)
@@ -184,7 +185,7 @@ class MinionCraftHelper {
for (minionId in tierOneMinionsFiltered) {
for (recipe in NEUItems.getRecipes(minionId)) {
if (recipe !is CraftingRecipe) continue
- if (recipe.ingredients.any { help.contains(it.internalItemId) }) {
+ if (recipe.getCachedIngredients().any { help.contains(it.internalItemId) }) {
val name = recipe.output.itemStack.name!!.removeColor()
val abc = name.replace(" I", " 0")
minions[abc] = minionId.replace("_1", "_0")