Skip to content

Commit

Permalink
Releases beta-11.
Browse files Browse the repository at this point in the history
  • Loading branch information
toxicity188 committed Apr 9, 2024
1 parent 8ac8700 commit 4f43f4e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ allprojects {
apply(plugin = "kotlin")

group = "kr.toxicity.hud"
version = "beta-10"
version = "beta-11"

repositories {
mavenCentral()
Expand Down
20 changes: 15 additions & 5 deletions dist/src/main/kotlin/kr/toxicity/hud/util/Adventures.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,22 @@ fun Int.toSpaceComponent(width: Int) = if (VERSION.version <= 18) {
if (abs > 256) {
val i = if (this > 0) 1 else -1
WidthComponent(
Component.text().font(LEGACY_SPACE_KEY)
.append(Component.text(((abs / 256 + 255) * i + 0xFFC00).parseChar()))
.append(Component.text(((abs % 256) * i + 0xFFC00).parseChar())),
Component.text()
.font(LEGACY_SPACE_KEY)
.content("${((abs / 256 + 255) * i + 0xFFC00).parseChar()}${((abs % 256) * i + 0xFFC00).parseChar()}"),
width
)
} else WidthComponent(Component.text().font(LEGACY_SPACE_KEY).content((this + 0xFFC00).parseChar()), width)
} else WidthComponent(
Component.text()
.font(LEGACY_SPACE_KEY)
.content((this + 0xFFC00).parseChar()),
width
)
} else {
WidthComponent(Component.text().font(SPACE_KEY).content((this + 0xD0000).parseChar()), width)
WidthComponent(
Component.text()
.font(SPACE_KEY)
.content((this + 0xD0000).parseChar()),
width
)
}

0 comments on commit 4f43f4e

Please sign in to comment.