diff options
author | CalMWolfs <cwolfson58@gmail.com> | 2023-06-20 09:42:01 +1000 |
---|---|---|
committer | CalMWolfs <cwolfson58@gmail.com> | 2023-06-20 09:42:01 +1000 |
commit | f88467675040a7351f56fcd9972382a2badab50d (patch) | |
tree | 0127c8ad64d70f4d271bd0b29e888529476f39a2 /src | |
parent | de47024ea3f4910bbca68a880491c8924fc5ecc6 (diff) | |
download | skyhanni-f88467675040a7351f56fcd9972382a2badab50d.tar.gz skyhanni-f88467675040a7351f56fcd9972382a2badab50d.tar.bz2 skyhanni-f88467675040a7351f56fcd9972382a2badab50d.zip |
hours do have 60 minutes
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 |