smoother shield cooldown display

This commit is contained in:
YuRaNnNzZZ 2023-11-16 13:10:16 +03:00
parent 41fa744d4a
commit f13f9481ea
Signed by: YuRaNnNzZZ
GPG Key ID: 5F71738C85A6006D

View File

@ -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)