From fc37164d0c197a4702c2b73006052a2cedcd1294 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 7 Aug 2023 13:28:40 +0200 Subject: Fixed End Node Tracker not updating when changing the text format --- .../java/at/hannibal2/skyhanni/features/misc/EnderNodeTracker.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc') 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> { val newList = mutableListOf>() - for (index in config.textFormat) { + for (index in config.textFormat.get()) { newList.add(map[index]) } return newList -- cgit