Skip to content

Commit

Permalink
Fix day count flash on 1.20.x
Browse files Browse the repository at this point in the history
  • Loading branch information
KawaiiZapic committed Aug 6, 2023
1 parent 5e3c7d3 commit eee1a86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client/java/moe/zapic/clockhud/render/DayCountRender.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ public static void render(DrawContext context) {
public static void setRenderStatus() {
if(renderTime <= 20) {
// Mojang shit, will treat all opacity < 0x04 as 0xff
TextOpacity = (int) (0xfb * (renderTime / 20)) + 4;
TextOpacity = (int) ((0xff * (renderTime / 20)) + 4);
} else if (renderTime >= 80) {
TextOpacity = (int) (0xfb * (1 - renderTime / 20)) + 4;
TextOpacity = (int) ((0xff * ((Duration - renderTime) / 20)) + 4);
} else if (TextOpacity != 0xff) {
TextOpacity = 0xff;
}
Expand Down

0 comments on commit eee1a86

Please sign in to comment.