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.

fixed #15 by adding extra condition to player air

authored by

Legoraft and committed by
GitHub
838d59a2 74644617

+5 -1
+5 -1
src/client/java/com/armorhud/mixin/client/armorHudMixin.java
··· 4 4 import net.minecraft.client.gui.hud.InGameHud; 5 5 import net.minecraft.client.util.math.MatrixStack; 6 6 import net.minecraft.entity.LivingEntity; 7 + import net.minecraft.entity.effect.StatusEffect; 7 8 import net.minecraft.entity.player.PlayerEntity; 8 9 import net.minecraft.item.ItemStack; 9 10 import org.spongepowered.asm.mixin.Final; ··· 37 38 int i = this.scaledHeight - 55; 38 39 39 40 // Moves armorhud up if player is underwater 40 - if (client.player.getAir() < client.player.getMaxAir()) { 41 + if (client.player.getAir() < client.player.getMaxAir() || client.player.isSwimming()) { 41 42 i = this.scaledHeight - 65; 43 + System.out.println("Moving..."); 42 44 } 45 + 43 46 // Moves armorhud down if player is in creative 44 47 if (client.player.isCreative()) { 45 48 i = this.scaledHeight - 39; 46 49 } 50 + 47 51 // Moves armorhud up if player is on mount 48 52 if (client.player.hasVehicle() && getRiddenEntity() != null) { 49 53 if (getRiddenEntity().isAlive()) {