mojira.dev
MC-88179

Armor bar disappears after changing dimension until GUI update

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

  1. Equip any armor, armor points are displayed above the hotbar

  2. Change dimensions through a portal

  3. Armor points are no longer displayed above the hotbar

  4. Update the GUI (Open inventory, take a screenshot)

  5. 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

MC-10838 Texture Glitch With Squids. MC-88690 Armor Bar dissapears when switching dimensions MC-89720 Armor HUD Resets Upon Switching Dimension MC-91223 Sprites armor disappear when entering the portal MC-91471 No armor status hud bar MC-91775 Armor HUD Disappears After Travelling to a Different Dimension MC-92699 Armor points get reset when entering The end MC-92947 Armor bar dissapearing when entering a portal. MC-93585 Minecraft Armor Point Bug MC-94090 armour HUD glitch MC-94794 Armor bugs out when going to the nether.. MC-95650 Armour bar not working MC-95811 Armor points don't appear when traveling to another dimension MC-96239 The armour bar always gone after using nether portal. MC-96666 Armor on the armor bar disappears when walking through nether portal even though you are wearing armor MC-97369 Armor bars vanish after changing dimensions MC-97693 Armor won't appear after exiting/Entering nether MC-100095 Armor level does not update on world change MC-100419 End Attribute MC-101223 No Armour-bar shown. MC-102654 Armor points in nether MC-103115 Armor Points on UI do not update upon entering or leaving Nether MC-105287 Armor Not Showing In Nether MC-111785 When you travel through any portal or exit the game and reload l, all your equipped armor does not show as equipped and does not protect you what so ever... MC-113781 If you go into the Nether in 17w06a youre Armorbar is gone. If you put a piece of Armor off youre Armorbar returns. MC-114072 Armor Bar Icons showing with delay after entering Dimension MC-114391 Attribute modifiers from equipment are lost when changing dimensions MC-115513 Armor Bar disappearing after entering a new Dimension MC-117048 The armor HUD won't display upon entering a nether portal MC-118521 Armor Bar nether portal bug MC-119256 Armor points disappears when entering/exiting Nether MC-133284 Armor bar hiding in nether? MC-133608 Armor bug in realms MC-137044 Armour Disappears When Changing Dimensions MC-137081 Armour bar vanishes when going through nether portals MC-141894 When going to the nether, equipped armor does not show in the armor bar MC-142900 Armor does not show up on bar if you go through a portal. MC-143187 Armor Gui disappears when entering new dimension besides overworld MC-143679 No armor showing up in the Nether dimansion MC-143806 Armor bar/indicator not showing up in the End or the Nether MC-144004 Armor bar is not working in nether MC-144055 Armor doesn't exist in the Nether MC-144278 no armor indicator wile wearing armor MC-144447 Armor icons disappear when going through a nether portal, and return only after logging in and out MC-148325 Armor Bar dissapears when travelling between dimensions MC-149095 Armor bar disappears when changing dimension until armor bar is updated MC-149914 Armor sprites above hearts disappear when going through portals MC-151259 Armor bars wont show up MC-151818 Defense points would not display after entering Nether Portal MC-152146 Your armour bars will still disappear after using a nether portal MC-153257 Armor status disappering after entering portal MC-153261 Armour bar disappears after entering different dimension. MC-153346 Armor points on hud not matching armor equipped after travelling through portals. MC-153544 armor bar disappearing while entering new realms MC-153578 Armor Bar Dissappearance MC-154180 visual Bug MC-154270 The Armor Bar/Armor Indicator is disappearing MC-155331 The shield bar disappears when you travel to and from the nether. MC-156171 Armor bar bug. MC-156425 Armor UI disappears after teleporting though nether portal MC-156545 Armor Icons Disappearing When Going Through Any Portal MC-156679 When you enter a nether portal the armor bars above your hearts get removed. MC-156918 Armour bars disappearing MC-157290 Lost armor strip after entering the portal to hell MC-157317 Armour Meter goes missing after going and leaving the Nether. MC-157370 Armor seemingly gone after going thru portals MC-157394 Armor bar disappearing when entering Nether MC-157639 Armor bar dissapears when changing dimensions MC-157684 Armour status (shield above hotbar) sometimes doesnt show MC-158137 Armor bar has been disappeared MC-158333 Armor Bar dissapears MC-159042 When i go in the nether or exit the nether my armor bar dissapears and the only way to fix it is to take off one piece of armor and put it back on. MC-160156 when you go to the nether your armor points don't show MC-161633 Armor icon disappearing MC-161762 going in the and out of the Nether portal... MC-167287 Armor Bar Visual Glitch MC-182788 No armor bar MCL-10838 Bug with the Armor

Attachments

Comments

migrated
[media][media][media][media][media]
kumasasa

Confirmed.

migrated

Confirmed in 15w45a

migrated

I have to take the armor off, then back on, to update it :/

[Mod] Neko

Confirmed for 16w05a

[Mod] Neko

Confirmed for 16w05b

[Mod] Neko

Confirmed for 16w07a

migrated

It happens in prereleases 1, 2, 3, and 4

[Mod] Neko

Confirmed for 1.9.1 Pre-Release 1

[Mod] Neko

Confirmed for 1.9.1 Pre-Release 2

[Mod] Neko

Confirmed for 1.9.1 Pre-Release 3

migrated

relates to MC-29386 and MC-679 and MC-46345 and MC-44471

migrated

And when will the GUI update release again?

migrated

The fix for this seems to be resending attributes on world change (done for Spigot and tested)

Edit: Should fix MC-29386 too

[Mod] Neko

Confirmed for 1.9.1 and 1.9.2

[Mod] Neko

Confirmed for 16w14a

[Mod] Neko

Confirmed for 16w15a

[Mod] Neko

Confirmed for 16w15b

[Mod] Neko

Confirmed for 1.9.3 Pre-Release 1

[Mod] Neko

Confirmed for 1.9.3 Pre-Release 2

[Mod] Neko

Confirmed for 1.9.3 Pre-Release 3

marcono1234

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.

[Mod] Neko

Confirmed for 16w21b

[Mod] Neko

Confirmed for 1.10-pre1

[Mod] Neko

Confirmed for 1.10-pre2

[Mod] Neko

Confirmed for 1.10.2

SteveKunG

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.

migrated

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

FaRo1

This is the PC/Java bug tracker.

migrated

ok sorry

kuemmi

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.

FaRo1

Probably MC-90035.

migrated

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

bemoty

Can confirm for MC 1.12.1.

migrated

Still occurs in 18w02a

migrated

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.

FaRo1

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.

migrated

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. 

migrated

Armor points, effects, etc. all still apply, the gui just doesn't show that

violine1101

@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.

SteveKunG

migrated

Confirmed

UI

armor, end, nether

Minecraft 15w36d, Minecraft 15w37a, Minecraft 15w40b, Minecraft 15w41b, Minecraft 15w43c, ..., Minecraft 1.14.3 Pre-Release 2, Minecraft 1.14.3 Pre-Release 3, Minecraft 1.14.4 Pre-Release 6, 1.14.4, 19w34a

19w35a

Retrieved