Skip to content

Commit

Permalink
fix(legacy): Scoreboard element visual issues when Minecraft font is …
Browse files Browse the repository at this point in the history
…used. (#5670)
  • Loading branch information
mems01 authored Feb 22, 2025
1 parent d4bf9a5 commit c303c8d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Keystrokes : Element("Keystrokes", 2.0, 34.0) {
private val borderColors = ColorSettingsInteger(this, "Border") { renderBorder }.with(Color.BLUE)
private val borderWidth by float("BorderWidth", 1.5F, 0.5F..5F) { renderBorder }
private val onPressAnimation by choices(
"OnPressAnimationMode", arrayOf("None", "Shrink", "Fill", "ReverseFill"), "Shrink"
"OnPressAnimationMode", arrayOf("None", "Shrink", "Fill", "ReverseFill"), "Fill"
)
private val shrinkPercentage by int("ShrinkPercentage", 90, 50..100, suffix = "%") { onPressAnimation == "Shrink" }
private val shrinkSpeed by int("ShrinkSpeed", 2, 0..5, suffix = "Ticks") { onPressAnimation == "Shrink" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ object RenderUtils : MinecraftInstance {
OutlineUtils.checkSetupFBO()
glPushMatrix()

glDisable(GL_ALPHA_TEST)
disableAlpha()

glEnable(GL_STENCIL_TEST)
glStencilFunc(GL_ALWAYS, 1, 1)
Expand All @@ -74,7 +74,7 @@ object RenderUtils : MinecraftInstance {
glStencilMask(0xFF)
glDisable(GL_STENCIL_TEST)

glEnable(GL_ALPHA_TEST)
enableAlpha()

glPopMatrix()
}
Expand All @@ -83,7 +83,9 @@ object RenderUtils : MinecraftInstance {
disableFastRender()
OutlineUtils.checkSetupFBO()
glPushMatrix()
glDisable(GL_ALPHA_TEST)

disableAlpha()

glEnable(GL_STENCIL_TEST)
glClear(GL_STENCIL_BUFFER_BIT)

Expand All @@ -101,7 +103,9 @@ object RenderUtils : MinecraftInstance {

glStencilMask(0xFF)
glDisable(GL_STENCIL_TEST)
glEnable(GL_ALPHA_TEST)

enableAlpha()

glPopMatrix()
}

Expand Down

0 comments on commit c303c8d

Please sign in to comment.