diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt index 50c11d128..30cd31e36 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt @@ -16,6 +16,7 @@ import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.removeColor +import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.concurrent.fixedRateTimer @@ -40,6 +41,14 @@ class FrozenTreasureTracker { } } + @SubscribeEvent + fun onWorldLoad(event: WorldEvent.Load) { + icePerHour = 0 + stoppedChecks = 0 + icePerMin.clear() + saveAndUpdate() + } + private fun calculateIcePerHour() { val difference = estimatedIce - lastEstimatedIce lastEstimatedIce = estimatedIce |