Skip to content

Commit

Permalink
Fix always rendering Cursor Item Cooldown & opacity errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Oxyopiia committed Feb 8, 2024
1 parent 241ef18 commit bb29d93
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ object ItemAbilityCooldown {

@SubscribeEvent
fun onRenderInGameHud(event: HudRenderEvent) {
if (!Vice.config.ITEM_COOLDOWN_DISPLAY && !Vice.config.SHOW_ITEMCD_TEXT_CROSSHAIR) return
if (!Vice.config.ITEM_COOLDOWN_DISPLAY || !Vice.config.SHOW_ITEMCD_TEXT_CROSSHAIR) return

val ability: ItemAbility? = ItemAbility.getByName(ItemUtils.getHeldItem().nameWithoutEnchants())

Expand Down Expand Up @@ -248,7 +248,7 @@ object ItemAbilityCooldown {
val topLeft = event.y + MathHelper.floor(16.0f * (1.0f - progressLeft))
val bottomRight = topLeft + MathHelper.ceil(16.0f * progressLeft)

HudUtils.fillUIArea(matrices, RenderLayer.getGuiOverlay(), event.x, topLeft, event.x + 16, bottomRight, 0, Color.white.rgb)
HudUtils.fillUIArea(matrices, RenderLayer.getGuiOverlay(), event.x, topLeft, event.x + 16, bottomRight, 0, Int.MAX_VALUE)
}

DisplayType.STATIC -> {
Expand Down

0 comments on commit bb29d93

Please sign in to comment.