Skip to content

Commit

Permalink
oops blit'd wrong 3: return of the shit code
Browse files Browse the repository at this point in the history
  • Loading branch information
screret committed Mar 30, 2024
1 parent 04932b5 commit a252347
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ public void render(ForgeGui gui, GuiGraphics graphics, float partialTick, int sc
gui.setupOverlayRenderState(true, false);
int minX = 32;
int minY = screenHeight - 32;
graphics.blit(GUI_TEXTURE, minX, minY, 0, 0, 64, 32, 64, 64);
graphics.blit(GUI_TEXTURE, minX, minY, 0, 0, 64, 32, 64, 32);

long oxygenAmount = SpaceSuitArmorItem.oxygenAmount(gui.getMinecraft().player);
long maxOxygen = SpaceSuitArmorItem.oxygenMax(gui.getMinecraft().player);
if (maxOxygen == 0) {
return;
}
graphics.blit(GUI_TEXTURE, minX, minY, 0, 0, (int) (oxygenAmount * 64.0 / maxOxygen), 32, 64, 64);
graphics.blit(GUI_TEXTURE, minX, minY, 0, 0.5f, (int) (oxygenAmount * 64.0 / maxOxygen), 32, 64, 32);
}
}
}
Expand Down

0 comments on commit a252347

Please sign in to comment.