aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-05-29 08:39:06 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-05-29 08:39:06 +0200
commitc8043a2c0b4dbd0733a316f2ed9b4f8c8d605056 (patch)
tree59da7c8d439408cc8f9f1903177dc5b69ab29436 /src/main/java/at
parent3b093ff5b689a871ae7ceaf1bd56d047f32d4162 (diff)
downloadskyhanni-c8043a2c0b4dbd0733a316f2ed9b4f8c8d605056.tar.gz
skyhanni-c8043a2c0b4dbd0733a316f2ed9b4f8c8d605056.tar.bz2
skyhanni-c8043a2c0b4dbd0733a316f2ed9b4f8c8d605056.zip
auto updating trophy fish display on neu data load
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishDisplay.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishManager.kt1
3 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
index 4cb09bfe9..ff905b3b0 100644
--- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
+++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
@@ -735,7 +735,7 @@ class SkyHanniMod {
loadModule(SharkFishCounter())
loadModule(PowerStoneGuideFeatures())
loadModule(OdgerWaypoint())
- loadModule(TrophyFishDisplay())
+ loadModule(TrophyFishDisplay)
loadModule(TiaRelayHelper())
loadModule(TiaRelayWaypoints())
loadModule(BasketWaypoints())
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishDisplay.kt
index 847731c65..447a7bf54 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishDisplay.kt
@@ -38,7 +38,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import kotlin.time.Duration.Companion.milliseconds
import kotlin.time.Duration.Companion.seconds
-class TrophyFishDisplay {
+object TrophyFishDisplay {
private val config get() = SkyHanniMod.feature.fishing.trophyFishing.display
private var recentlyDroppedTrophies = TimeLimitedCache<NEUInternalName, TrophyRarity>(5.seconds)
@@ -89,6 +89,7 @@ class TrophyFishDisplay {
}
}
+
fun update() {
if (!isEnabled()) return
val list = mutableListOf<Renderable>()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishManager.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishManager.kt
index 77701c1b0..2d8a7cb0e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishManager.kt
@@ -74,6 +74,7 @@ object TrophyFishManager {
ChatUtils.debug("Updated trophy fishing data from NEU PV: $name $rarity: $current -> $newValue")
}
}
+ TrophyFishDisplay.update()
ChatUtils.chat("Updated Trophy Fishing data via NEU PV!")
}