Skip to content

Commit

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

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) (minX + (oxygenAmount * 32.0 / maxOxygen)), 64, 64, 64);
graphics.blit(GUI_TEXTURE, minX, minY, 0, 0, (int) (oxygenAmount * 64.0 / maxOxygen), 32, 64, 64);
}
}
}
Expand Down

0 comments on commit 04932b5

Please sign in to comment.