Commit 2724a67 1 parent 6fff0e1 commit 2724a67 Copy full SHA for 2724a67
File tree 2 files changed +6
-5
lines changed
dist/src/main/kotlin/kr/toxicity/hud/compass
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ val platform = "4.3.4"
31
31
val targetJavaVersion = 21
32
32
val velocity = " 3.4.0"
33
33
val bStats = " 3.1.0"
34
- val betterCommand = " 168d199954 "
34
+ val betterCommand = " 1.1 "
35
35
36
36
val supportedMinecraftVersions = listOf (
37
37
// 1.17
Original file line number Diff line number Diff line change @@ -222,10 +222,11 @@ class CircleCompass(
222
222
val yaw = player.location().yaw.toDouble()
223
223
var degree = yaw
224
224
if (degree < 0 ) degree + = 360.0
225
- val div = (degree / 90 * length).roundToInt()
225
+ val quarterDegree = degree / 90 * length
226
+ val div = quarterDegree.toInt()
226
227
var comp = EMPTY_WIDTH_COMPONENT
227
228
val lengthDiv = length / 2
228
- val mod = (degree.toInt() % length).toDouble() / length
229
+ val mod = quarterDegree - div - 0.5
229
230
val loc = player.location()
230
231
val world = player.world()
231
232
for (i in 1 .. < length) {
@@ -240,8 +241,8 @@ class CircleCompass(
240
241
0 , length * 4 -> images.s
241
242
else -> images.chain
242
243
}?.map?.get(CompassData (if (i > lengthDiv) length - i else i))?.let {
243
- val glyphWidth = ((it.width + space) * (mod - 0.5 )).roundToInt()
244
- (glyphWidth + space ).toSpaceComponent() + it + (- glyphWidth + space ).toSpaceComponent()
244
+ val move = (mod * ( space * 2 + it.width )).roundToInt()
245
+ (space + move ).toSpaceComponent() + it + (space - move ).toSpaceComponent()
245
246
} ? : (space * 2 ).toSpaceComponent()
246
247
}
247
248
player.pointedLocation.forEach {
You can’t perform that action at this time.
0 commit comments