The bug
When going into or out of the nether or end, the armor bar disappears and only reappears when it gets an update, for example by removing a piece of the armor.
How to reproduce
Equip any armor, armor points are displayed above the hotbar
Change dimensions through a portal
Armor points are no longer displayed above the hotbar
Update the GUI (Open inventory, take a screenshot)
Armor points are again displayed above the hotbar
Code analysis
Code analysis by @unknown can be found in this comment.
A fix in Forge for 1.12 can be found here.
Related issues
is duplicated by
relates to
Attachments
Comments


Confirmed.

Confirmed in 15w45a

I have to take the armor off, then back on, to update it :/
Confirmed for 16w05a
Confirmed for 16w05b
Confirmed for 16w07a

It happens in prereleases 1, 2, 3, and 4
Confirmed for 1.9.1 Pre-Release 1
Confirmed for 1.9.1 Pre-Release 2
Confirmed for 1.9.1 Pre-Release 3

And when will the GUI update release again?

The fix for this seems to be resending attributes on world change (done for Spigot and tested)
Edit: Should fix MC-29386 too
Confirmed for 1.9.1 and 1.9.2
Confirmed for 16w14a
Confirmed for 16w15a
Confirmed for 16w15b
Confirmed for 1.9.3 Pre-Release 1
Confirmed for 1.9.3 Pre-Release 2
Confirmed for 1.9.3 Pre-Release 3

Please link to this comment in the description
The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.
It looks like the reason for this is that the method net.minecraft.client.Minecraft.setDimensionAndSpawnPlayer(int)
creates a new net.minecraft.client.entity.EntityPlayerSP
which means the player loses all data. Currently attributes are not copied from the old player object.
Note: Creating a new player object is pretty risky and will very likely cause bugs similar to this one in the future.
Confirmed for 16w21b
Confirmed for 1.10-pre1
Confirmed for 1.10-pre2
Confirmed for 1.10.2

Thanks to @Marcono1234. I try to test it on 1.10 Forge and removed EntityPlayerSP entityplayersp = this.thePlayer;
Armor bars show up again when switching dimension.
But the other issues with Locked Difficulty and Absorption effect not fixed.

it's happening to me after updating TU46 on Xbox 360.

This is the PC/Java bug tracker.

ok sorry

Could this be related to a problem with deploying the elytra in the end? I just tried to fly unsuccessfully with elytra and armor equipped, and after a bit, I noticed that the armor bar wasn't displayed.

Probably MC-90035.

This has been recently fixed in Forge for 1.12. The code might be useful for analysis of this bug.
https://github.com/MinecraftForge/MinecraftForge/commit/32e811bd7a72efc59dd05c89775e62de908070ce
Can confirm for MC 1.12.1.

Still occurs in 18w02a

hey guys
this is just a note that the original forge fix I made that was posted above is buggy, and I have made a more correct fix here: https://github.com/MinecraftForge/MinecraftForge/pull/4830.
Marcono's comment is correct but is not the best way to fix the issue, because the client player should lose all of its attributes when it's recreated due to a death. But the client doesn't know whether a given respawn packet is due to a teleportation or death.
The optimal fix is to resend all attribute modifiers after a non-death dimension change, which is what the new forge fix I've linked does.

Another alternative (probably the best possibility) would of course be to have an argument for respawn packets if it's a dimension change or a death.

This is still happening to me in vanilla 1.13.2. Anyone figured out if you're still protected from damage? I'm worried that I'll walk out into the Nether and get blown to bits. My elytra still works, however.

Armor points, effects, etc. all still apply, the gui just doesn't show that
@unknown, please don't re-add unnecessary information into the environment field; this issue has been reproduced in multiple different environments and therefore doesn't need to be mentioned.