Skip to content

Commit f84360f

Browse files
committed
Coordinates toggle for current dimension only
1 parent fdd53c3 commit f84360f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/kotlin/com/lambda/module/hud/Coordinates.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ object Coordinates : HudModule(
4141
OtherDimension("Other Dimension"),
4242
}
4343

44-
private val showDimension by setting("Show Dimension", true)
44+
private val showDimension by setting("Show Dimension Name", true)
45+
private val showCurrentDimensionOnly by setting("Show Current Dimension Only", true)
4546

4647
private val formatter = FormatterSettings(c = this, baseGroup = arrayOf(Group.CurrentDimension)).apply {
4748
applyEdits {
@@ -60,7 +61,9 @@ object Coordinates : HudModule(
6061
if (world.isNether) player.overworldCoord.let { Vec2d(it.x, it.z) }.format(formatter.locale, formatter.separator, "[", "]", formatter.precision)
6162
else player.netherCoord.let { Vec2d(it.x, it.z) }.format(formatter.locale, formatter.separator, "[", "]", formatter.precision)
6263

63-
val text = "$position $otherDimensionPos"
64+
val text =
65+
if (showCurrentDimensionOnly) position
66+
else "$position $otherDimensionPos"
6467

6568
val withDimension =
6669
if (showDimension) "$text ${world.dimensionName}"

0 commit comments

Comments
 (0)