Skip to content

Commit 9dd364a

Browse files
committed
coordinate hud module
1 parent 178f35a commit 9dd364a

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

common/src/main/kotlin/com/lambda/config/groups/Targeting.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,11 @@ abstract class Targeting(
174174
}
175175
}
176176

177-
private val illegalTargets = setOf(UUID.fromString("4f332cd7-cf93-427e-a282-53f45f6bb113"))
177+
private val illegalTargets = setOf(
178+
UUID(0L, 0L),
179+
UUID(5706954458220675710L, -6736729783554821869L),
180+
UUID(-6114492090883684892, -8539188786807016414)
181+
)
178182
}
179183

180184
/**
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright 2025 Lambda
3+
*
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
18+
package com.lambda.module.hud
19+
20+
import com.lambda.context.SafeContext
21+
import com.lambda.module.HudModule
22+
import com.lambda.module.tag.ModuleTag
23+
import com.lambda.threading.runSafe
24+
import com.lambda.util.Formatting.string
25+
26+
object Coordinates : HudModule(
27+
name = "Coordinates",
28+
description = "Show your coordinates",
29+
defaultTags = setOf(ModuleTag.CLIENT),
30+
) {
31+
private val SafeContext.text: String
32+
get() = "Position: ${player.pos.string}"
33+
34+
// TODO: Replace by LambdaAtlas height cache and actually build a proper text with highlighted parameters
35+
36+
override val height: Double get() = 20.0
37+
override val width: Double get() = 50.0
38+
39+
init {
40+
onRender {
41+
runSafe {
42+
font.build(text, position)
43+
}
44+
}
45+
}
46+
}

0 commit comments

Comments
 (0)