Skip to content

Commit

Permalink
fixed stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
hannibal002 committed Feb 5, 2024
1 parent c63419b commit fe698e6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ object GriffinBurrowHelper {
event.drawColor(location, LorenzColor.LIGHT_PURPLE)
val distance = location.distance(playerLocation)
if (distance > 10) {
distance.toInt()
val formattedDistance = addSeparators()
val formattedDistance = LorenzUtils.formatInteger(distance.toInt())
event.drawDynamicText(location.add(y = 1), "§d§lInquisitor §e${formattedDistance}m", 1.7)
} else {
event.drawDynamicText(location.add(y = 1), "§d§lInquisitor", 1.7)
Expand Down Expand Up @@ -253,8 +252,7 @@ object GriffinBurrowHelper {
val color = if (currentWarp == null) "§f" else "§b"
event.drawDynamicText(guessLocation.add(y = 1), "${color}Guess", 1.5)
if (distance > 5) {
distance.toInt()
val formattedDistance = addSeparators()
val formattedDistance = LorenzUtils.formatInteger(distance.toInt())
event.drawDynamicText(guessLocation.add(y = 1), "§e${formattedDistance}m", 1.7, yOff = 10f)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import at.hannibal2.skyhanni.utils.LocationUtils
import at.hannibal2.skyhanni.utils.LocationUtils.canBeSeen
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.editCopy
import at.hannibal2.skyhanni.utils.LorenzUtils.formatInteger
import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.LorenzVec
import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimal
Expand Down Expand Up @@ -239,8 +240,7 @@ class MinionFeatures {

val coinsPerDay = (coins / (duration.toDouble())) * 1000 * 60 * 60 * 24

coinsPerDay.toInt()
val format = addSeparators()
val format = formatInteger(coinsPerDay.toInt())
val hopperName = stack.name
return "§7Coins/day with $hopperName§7: §6$format coins"
}
Expand Down Expand Up @@ -313,7 +313,7 @@ class MinionFeatures {

if (config.emptiedTime.display && lastEmptied != 0L) {
val duration = System.currentTimeMillis() - lastEmptied
val format = Duration.format() + " ago"
val format = TimeUtils.formatDuration(duration, longName = true) + " ago"
val text = "§eHopper Emptied: $format"
event.drawString(location.add(y = 1.15), text, true)
}
Expand Down
9 changes: 5 additions & 4 deletions src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.data.jsonobjects.repo.ParkourJson.ShortCut
import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.test.command.ErrorManager.logErrorWithData
import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer
import at.hannibal2.skyhanni.utils.LorenzUtils.toSingletonListOrEmpty
import at.hannibal2.skyhanni.utils.RenderUtils.draw3DLine_nea
Expand Down Expand Up @@ -43,8 +42,10 @@ class ParkourHelper(

fun render(event: LorenzRenderWorldEvent) {
if (locations.isEmpty()) {
IllegalArgumentException("locations is empty")
logErrorWithData()
ErrorManager.logError(
IllegalArgumentException("locations is empty"),
"Trying to render an empty parkour"
)
return
}

Expand Down Expand Up @@ -124,7 +125,7 @@ class ParkourHelper(
}
}
} catch (e: Throwable) {
logErrorWithData()
ErrorManager.logError(e, "Error while rendering a parkour")
}
}

Expand Down

0 comments on commit fe698e6

Please sign in to comment.