Fix effect duration on rectangle button being misaligned

This commit is contained in:
DBotThePony 2023-07-27 13:42:07 +07:00
parent db5cdbe802
commit 8567e75b6f
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -116,7 +116,7 @@ open class EffectListPanel<out S : Screen> @JvmOverloads constructor(
minecraft.mobEffectTextures.get(effect.effect).render(graphics, x = 3f, y = 3f, width = width - 6f, height = height - 6f) minecraft.mobEffectTextures.get(effect.effect).render(graphics, x = 3f, y = 3f, width = width - 6f, height = height - 6f)
RenderSystem.setShaderColor(1f, 1f, 1f, 1f) RenderSystem.setShaderColor(1f, 1f, 1f, 1f)
graphics.draw(font, formatTickDuration(effect.duration), width / 2f - 1f, height / 2f, scale = 0.75f, gravity = RenderGravity.CENTER_CENTER, color = RGBAColor.WHITE) graphics.draw(font, formatTickDuration(effect.duration), width / 2f, height / 2f, scale = 0.75f, gravity = RenderGravity.CENTER_CENTER, color = RGBAColor.WHITE)
} }
override fun innerRenderTooltips(graphics: GuiGraphics, mouseX: Float, mouseY: Float, partialTick: Float): Boolean { override fun innerRenderTooltips(graphics: GuiGraphics, mouseX: Float, mouseY: Float, partialTick: Float): Boolean {