diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/minion')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt index 455349a35..87fc2eb49 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt @@ -73,12 +73,14 @@ class MinionFeatures { if (loc != null) { val time = SkyHanniMod.feature.minions.lastOpenedMinionTime * 1_000 if (lastMinionOpened + time > System.currentTimeMillis()) { - event.drawWaypointFilled(loc.add(-0.5, 0.0, -0.5), + event.drawWaypointFilled( + loc.add(-0.5, 0.0, -0.5), color, true, extraSize = -0.25, extraSizeTopY = 0.2, - extraSizeBottomY = 0.0) + extraSizeBottomY = 0.0 + ) } } } @@ -106,6 +108,9 @@ class MinionFeatures { minions[location] = System.currentTimeMillis() saveConfig() } + if (location !in minions) { + minions[location] = 0 + } if (System.currentTimeMillis() - lastMinionPickedUp < 2_000) { minions.remove(location) @@ -139,7 +144,6 @@ class MinionFeatures { } val duration = System.currentTimeMillis() - lastClicked -// println("line: '$line'") //§7Held Coins: §b151,389 val coins = line.split(": §b")[1].replace(",", "").toDouble() @@ -198,7 +202,9 @@ class MinionFeatures { for (minion in minions) { val location = minion.key if (playerLocation.distance(location) < SkyHanniMod.feature.minions.emptiedTimeDistance) { - val duration = System.currentTimeMillis() - minion.value + val lastEmptied = minion.value + if (lastEmptied == 0L) continue + val duration = System.currentTimeMillis() - lastEmptied val format = StringUtils.formatDuration(duration / 1000) if (LocationUtils.canSee(playerEyeLocation, location)) { val text = "§eHopper Emptied: $format" |