From f13f9481ea412d89b5c42966cb085b8876c6bbec Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Thu, 16 Nov 2023 13:10:16 +0300 Subject: [PATCH] smoother shield cooldown display --- src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt index 16d14743d..8886d1969 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt @@ -362,7 +362,7 @@ object MatteryGUI { val ply = minecraft.player ?: return false if (!ply.isUsingItem || stack != ply.useItem || ply.isBlocking) return false - val percent = ((stack.item.getUseDuration(stack) - ply.useItemRemainingTicks) / 5f).coerceIn(0f, 1f) + val percent = ((stack.item.getUseDuration(stack) - ply.useItemRemainingTicks + minecraft.partialTick) / 5f).coerceIn(0f, 1f) RenderSystem.setShaderColor(1f, 1f, 1f, 0.5f) drawArc(graphics, x + 8f, y + 8f, 8f, 0f, PI / 2.0, PI / 2.0 + PI * 2.0 * percent, alignAtCenter = true) RenderSystem.setShaderColor(1f, 1f, 1f, 1f)