Skip to content

Commit

Permalink
refactor(legacy): small height adjustment to scoreboard element (#5009)
Browse files Browse the repository at this point in the history
much better.
  • Loading branch information
EclipsesDev authored Dec 22, 2024
1 parent 2ca4307 commit 09fd2c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ object TNTBlock : Module("TNTBlock", Category.COMBAT, spacedName = "TNT Block",
private val autoSword by boolean("AutoSword", true)
private var blocked = false

val onMotionUpdate = handler<MotionEvent> {
val onMotion = handler<MotionEvent> {
val thePlayer = mc.thePlayer ?: return@handler
val theWorld = mc.theWorld ?: return@handler

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class ScoreboardElement(
val maxHeight = scoreCollection.size * fontHeight
val l1 = -maxWidth - 3 - if (rect) 3 else 0

drawRoundedRectInt(l1 - 4, -4, 7, maxHeight + fontHeight, backColor, roundedRectRadius)
drawRoundedRectInt(l1 - 4, -4, 7, maxHeight + fontHeight + 2, backColor, roundedRectRadius)

scoreCollection.filterNotNull().forEachIndexed { index, score ->
val team = scoreboard.getPlayersTeam(score.playerName)
Expand Down Expand Up @@ -194,7 +194,7 @@ class ScoreboardElement(
}
}

return Border(l1 - 4F, -4F, 7F, maxHeight + fontHeight.toFloat())
return Border(l1 - 4F, -4F, 7F, maxHeight + fontHeight + 2F)
}

return null
Expand Down

0 comments on commit 09fd2c3

Please sign in to comment.