aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-06-13 17:31:20 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-06-13 17:31:20 +0200
commit578895eb80ca1c98e7b26bf2257cc0986db09421 (patch)
treeb69c29c86265aea00a61b4434ae2735b9abdfc85 /src/main/java/at/hannibal2/skyhanni
parent998e3949a05487705dde719dd1d7b54609f50003 (diff)
downloadskyhanni-578895eb80ca1c98e7b26bf2257cc0986db09421.tar.gz
skyhanni-578895eb80ca1c98e7b26bf2257cc0986db09421.tar.bz2
skyhanni-578895eb80ca1c98e7b26bf2257cc0986db09421.zip
added todos
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
index 698098306..dbdfa86cc 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
@@ -90,6 +90,7 @@ object LorenzUtils {
private var previousApril = false
+ // TODO move into lorenz logger. then rewrite lorenz logger and use something different entirely
fun SimpleDateFormat.formatCurrentTime(): String = this.format(System.currentTimeMillis())
// TODO move to string utils
@@ -130,10 +131,12 @@ object LorenzUtils {
fun formatPercentage(percentage: Double, format: String?): String =
DecimalFormat(format).format(percentage * 100).replace(',', '.') + "%"
+ // TODO move into chat utils
fun consoleLog(text: String) {
SkyHanniMod.consoleLog(text)
}
+ // TODO move into crimson api
fun getPointsForDojoRank(rank: String): Int {
return when (rank) {
"S" -> 1000
@@ -146,6 +149,7 @@ object LorenzUtils {
}
}
+ // TODO move into time utils
fun getSBMonthByName(month: String): Int {
var monthNr = 0
for (i in 1..12) {
@@ -165,6 +169,7 @@ object LorenzUtils {
fun getPlayer(): EntityPlayerSP? = Minecraft.getMinecraft()?.thePlayer
+ // TODO move into renderable utils
fun fillTable(
data: List<DisplayTableEntry>,
padding: Int = 1,
@@ -203,6 +208,7 @@ object LorenzUtils {
lines[index] = ChatComponentText(text.capAtMinecraftLength(91))
}
+ // TODO move into string api
fun colorCodeToRarity(colorCode: Char): String {
return when (colorCode) {
'f' -> "Common"
@@ -309,15 +315,20 @@ object LorenzUtils {
}
}
+ // TODO move into mayor api
private val recalculateDerpy =
RecalculatingValue(1.seconds) { Perk.DOUBLE_MOBS_HP.isActive }
+ // TODO move into mayor api
val isDerpy get() = recalculateDerpy.getValue()
+ // TODO move into mayor api
fun Int.derpy() = if (isDerpy) this / 2 else this
+ // TODO move into mayor api
fun Int.ignoreDerpy() = if (isDerpy) this * 2 else this
+ // TODO move into json api
val JsonPrimitive.asIntOrNull get() = takeIf { it.isNumber }?.asInt
fun sendTitle(text: String, duration: Duration, height: Double = 1.8, fontSize: Float = 4f) {
@@ -356,6 +367,7 @@ object LorenzUtils {
@Deprecated("Use the new one instead", ReplaceWith("RegexUtils.hasGroup"))
fun Matcher.hasGroup(groupName: String): Boolean = groupOrNull(groupName) != null
+ // TODO move into Mining API
fun inAdvancedMiningIsland() = IslandType.DWARVEN_MINES.isInIsland() ||
IslandType.CRYSTAL_HOLLOWS.isInIsland() || IslandType.MINESHAFT.isInIsland()
@@ -374,6 +386,7 @@ object LorenzUtils {
return !lastGuiTime.isInPast()
}
+ // TODO move into location utils
fun AxisAlignedBB.getCorners(y: Double): List<LorenzVec> {
val cornerOne = LorenzVec(minX, y, minZ)
val cornerTwo = LorenzVec(minX, y, maxZ)