diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java | 2 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/EnderNodeTracker.kt | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java index 81818dca6..eb7b5d2c6 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java @@ -628,7 +628,7 @@ public class MiscConfig { " " } ) - public List<Integer> textFormat = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 14, 15, 16, 17, 23)); + public Property<List<Integer>> textFormat = Property.of(new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 14, 15, 16, 17, 23))); @Expose public Position position = new Position(10, 80, false, true); 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 |