diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-03 03:24:50 +0100 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-03 03:24:50 +0100 |
| commit | d4ee6c0e61a2543a654ade7be19b0effe95fb8d1 (patch) | |
| tree | 2ff9e1c7d7e913cfa6e01c14ff93e2fe1b712aa0 /src/main/java/at/hannibal2/skyhanni/features | |
| parent | 6e36d679df0444f19a65c6c81dd26e5b344a2cd7 (diff) | |
| download | skyhanni-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')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt | 7 | ||||
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt | 1 |
2 files changed, 4 insertions, 4 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") diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt index 8284c0605..c596b2eab 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt @@ -59,7 +59,6 @@ object TrevorTracker { peltsPerSecond.clear() peltsPerHour = 0 stoppedChecks = 0 - saveAndUpdate() } private fun formatDisplay(map: List<List<Any>>): List<List<Any>> { |
