diff options
| author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-06-13 22:21:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-13 22:21:50 +0200 |
| commit | 529639fdd0683066eadffe93473a300a2177c008 (patch) | |
| tree | d89cd9aa2c04b4a8a839b9c3b1a56d2058fa7956 /src/main/java/at/hannibal2/skyhanni/features/nether | |
| parent | 151865bca064421d48ec19279b759134fc428443 (diff) | |
| download | skyhanni-529639fdd0683066eadffe93473a300a2177c008.tar.gz skyhanni-529639fdd0683066eadffe93473a300a2177c008.tar.bz2 skyhanni-529639fdd0683066eadffe93473a300a2177c008.zip | |
Backend: for each (#1725)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/nether')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/nether/MatriarchHelper.kt | 4 | ||||
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt | 19 |
2 files changed, 11 insertions, 12 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/MatriarchHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/MatriarchHelper.kt index da0ef76eb..1d74e0b96 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/MatriarchHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/MatriarchHelper.kt @@ -61,8 +61,8 @@ object MatriarchHelper { if (config.line) { val color = config.lineColor.toChromaColor() var prePoint = event.exactPlayerEyeLocation() - pearlList.forEach { - val point = it.baseEntity.getLorenzVec().add(y = 1.2) + for (mob in pearlList) { + val point = mob.baseEntity.getLorenzVec().add(y = 1.2) event.draw3DLine(prePoint, point, color, 10, true) prePoint = point } diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt index 2408ef1c9..803cedb78 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt @@ -98,17 +98,16 @@ class CrimsonIsleReputationHelper(skyHanniMod: SkyHanniMod) { } if (event.repeatSeconds(3)) { - TabListData.getTabList() - .filter { it.contains("Reputation:") } - .forEach { - factionType = if (it.contains("Mage")) { - FactionType.MAGE - } else if (it.contains("Barbarian")) { - FactionType.BARBARIAN - } else { - FactionType.NONE - } + val list = TabListData.getTabList().filter { it.contains("Reputation:") } + for (line in list) { + factionType = if (line.contains("Mage")) { + FactionType.MAGE + } else if (line.contains("Barbarian")) { + FactionType.BARBARIAN + } else { + FactionType.NONE } + } } } |
