A mod that adds your armor to the hud modrinth.com/mod/simple-armor-hud
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: armor centering has changed

+8 -4
+8 -4
src/client/java/com/armorhud/mixin/client/armorHudMixin.java
··· 56 56 57 57 ArmorAccessor armorAccessor = armorHud.getArmorAccessor(); 58 58 int pieces = armorAccessor.getPieces(client.player); 59 + // System.out.println(pieces); 59 60 60 - final int hungerWidth = 80 + 8; // Bar advances 8 pixels to the left 10 times, 8 is added for the width of the last sprite. 61 + final int hungerWidth = 14; // Magic number to center 4 armor pieces 61 62 final int armorWidth = 15; 62 - final int barWidth = armorWidth * pieces; 63 + 63 64 // Added check for Above_Health_Bar -Dino 64 65 float hungerX = scaledWidth / 2f + (config.ABOVE_HEALTH_BAR 65 - && client.player.getMaxHealth() + client.player.getMaxAbsorption() < 180 ? -10 : 91); 66 - float x = hungerX - hungerWidth / 2f + barWidth / 2f; 66 + && client.player.getMaxHealth() + client.player.getMaxAbsorption() < 180 ? -10 : 91); 67 + float x = hungerX + hungerWidth; 67 68 x += 2; // This makes it look better because the helmet is thinner. 68 69 69 70 for (EquipmentSlot slot : EquipmentSlot.values()) { 71 + x -= armorWidth; 72 + 70 73 if (slot.isArmorSlot()) { 71 74 renderArmorPiece(context, x, armorHeight, tickCounter, client.player, armorAccessor.getArmorPiece(client.player, slot)); 72 75 } ··· 146 149 armorHeight -= (client.player.isCreative() ? 26 : 10); 147 150 } 148 151 } 152 + 149 153 // Armor hud only has to be moved up if better mount hud is enabled or player is in creative 150 154 else { 151 155 if (config.BETTER_MOUNT_HUD && !client.player.isCreative()) {