From 1bdbfacbf662c235a314b75c4bf2109ab2904b66 Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Sat, 30 Mar 2024 23:42:09 +0200 Subject: [PATCH] yay I blit right! --- .../gcyr/common/gui/EntityOxygenHUD.java | 5 +++-- .../assets/gcyr/textures/gui/oxygen_bar.png | Bin 0 -> 8399 bytes 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/assets/gcyr/textures/gui/oxygen_bar.png diff --git a/src/main/java/argent_matter/gcyr/common/gui/EntityOxygenHUD.java b/src/main/java/argent_matter/gcyr/common/gui/EntityOxygenHUD.java index 7f07b3c5..c10f2c4a 100644 --- a/src/main/java/argent_matter/gcyr/common/gui/EntityOxygenHUD.java +++ b/src/main/java/argent_matter/gcyr/common/gui/EntityOxygenHUD.java @@ -17,14 +17,15 @@ 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, 32); + graphics.blit(GUI_TEXTURE, minX, minY, 0, 0, 64, 16, 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.5f, (int) (oxygenAmount * 64.0 / maxOxygen), 32, 64, 32); + int width = (int) (oxygenAmount * 64.0 / maxOxygen); + graphics.blit(GUI_TEXTURE, minX, minY, 0, 16, width, 16, 64, 32); } } } diff --git a/src/main/resources/assets/gcyr/textures/gui/oxygen_bar.png b/src/main/resources/assets/gcyr/textures/gui/oxygen_bar.png new file mode 100644 index 0000000000000000000000000000000000000000..1559d7d87e7e82787176c315f40b17133658289c GIT binary patch literal 8399 zcmeI2yNg{_6vp>?-Fs)E#uOr2$bhAyg`JJB#5jgX5Wz>~E1*JDbWjmg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