Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/main/kotlin/com/lambda/module/hud/Coordinates.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ object Coordinates : HudModule(
}

private val showDimension by setting("Show Dimension Name", true)
private val showBiome by setting("Show Biome Name", true)
private val showCurrentDimensionOnly by setting("Show Current Dimension Only", true)

private val formatter = FormatterSettings(c = this, baseGroup = arrayOf(Group.CurrentDimension)).apply {
Expand Down Expand Up @@ -69,7 +70,16 @@ object Coordinates : HudModule(
if (showDimension) "$text ${world.dimensionName}"
else text

textCopyable(withDimension)
val withBiome =
if (showBiome) "$withDimension in ${beautifyBiome(world.getBiome(player.blockPos).idAsString)}"
else withDimension
textCopyable(withBiome)
}
}

fun beautifyBiome(biome: String): String = biome
.substringAfterLast(':')
.replace('_', ' ')
.split(' ')
.joinToString(" ") { it.replaceFirstChar(Char::uppercaseChar) }
}