aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/misc
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-07 13:28:40 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-07 13:28:40 +0200
commitfc37164d0c197a4702c2b73006052a2cedcd1294 (patch)
tree0649279427b0e32d322ed555cca68d382e5bf3fc /src/main/java/at/hannibal2/skyhanni/features/misc
parent33ac10175c2e90db87ca63c3a1ff4eda79ce7588 (diff)
downloadskyhanni-fc37164d0c197a4702c2b73006052a2cedcd1294.tar.gz
skyhanni-fc37164d0c197a4702c2b73006052a2cedcd1294.tar.bz2
skyhanni-fc37164d0c197a4702c2b73006052a2cedcd1294.zip
Fixed End Node Tracker not updating when changing the text format
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/EnderNodeTracker.kt7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/EnderNodeTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/EnderNodeTracker.kt
index 90c00bdad..1ecb6f5d8 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/EnderNodeTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/EnderNodeTracker.kt
@@ -11,6 +11,7 @@ import at.hannibal2.skyhanni.events.PlaySoundEvent
import at.hannibal2.skyhanni.features.bazaar.BazaarApi
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList
+import at.hannibal2.skyhanni.utils.LorenzUtils.afterChange
import at.hannibal2.skyhanni.utils.LorenzUtils.editCopy
import at.hannibal2.skyhanni.utils.NEUItems
import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
@@ -99,6 +100,10 @@ class EnderNodeTracker {
@SubscribeEvent
fun onConfigLoad(event: ConfigLoadEvent) {
+ config.textFormat.afterChange {
+ saveAndUpdate()
+ }
+
val hidden = ProfileStorageData.profileSpecific?.enderNodeTracker ?: return
totalNodesMined = hidden.totalNodesMined
totalEndermiteNests = hidden.totalEndermiteNests
@@ -191,7 +196,7 @@ class EnderNodeTracker {
private fun formatDisplay(map: List<List<Any>>): List<List<Any>> {
val newList = mutableListOf<List<Any>>()
- for (index in config.textFormat) {
+ for (index in config.textFormat.get()) {
newList.add(map[index])
}
return newList