smoother shield cooldown display
This commit is contained in:
parent
41fa744d4a
commit
f13f9481ea
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user