From 83dfc893791ce334d13b35786b57b9384d336d3b Mon Sep 17 00:00:00 2001 From: Roelymole Date: Tue, 7 Jan 2025 23:01:18 +0000 Subject: [PATCH] fix: swapped oxygen tanks which were displayed the wrong way round in the oxygen overlay --- .../galacticraft/mod/client/gui/overlay/OxygenOverlay.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/dev/galacticraft/mod/client/gui/overlay/OxygenOverlay.java b/src/main/java/dev/galacticraft/mod/client/gui/overlay/OxygenOverlay.java index 4452c9c60..5bb6e7fa6 100644 --- a/src/main/java/dev/galacticraft/mod/client/gui/overlay/OxygenOverlay.java +++ b/src/main/java/dev/galacticraft/mod/client/gui/overlay/OxygenOverlay.java @@ -45,9 +45,10 @@ public static void onHudRender(GuiGraphics graphics, DeltaTracker delta) { if (body != null && !body.value().atmosphere().breathable()) { Container inv = mc.player.galacticraft$getOxygenTanks(); final int y = 4; - for (int i = 0; i < inv.getContainerSize(); i++) { - Storage storage = ContainerItemContext.withConstant(inv.getItem(i)).find(FluidStorage.ITEM); - int x = mc.getWindow().getGuiScaledWidth() - ((Constant.TextureCoordinate.OVERLAY_WIDTH + y) * (i + 1)); + final int n = inv.getContainerSize(); + for (int i = n; i > 0; i--) { + Storage storage = ContainerItemContext.withConstant(inv.getItem(n - i)).find(FluidStorage.ITEM); + int x = mc.getWindow().getGuiScaledWidth() - ((Constant.TextureCoordinate.OVERLAY_WIDTH + y) * i); int outline = 0x99FFFFFF;