[MCPE-20130] Experience is not updated after UpdateAttributesPacket Created: 22/Feb/17  Updated: 07/Aug/20  Resolved: 10/Aug/17

Status: Resolved
Project: Minecraft (Bedrock codebase)
Component/s: None
Affects Version/s: 1.0.3, 1.0.4.11, 1.0.5.0, 1.0.5.13, 1.0.6.52, 1.1.0.5, 1.1.0.8, 1.1.0.9, 1.1.0.55, 1.1.4.51, 1.2.0.2
Fix Version/s: 1.2.0.11

Type: Bug
Reporter: Maksim Sunduk
Resolution: Fixed Votes: 8
Labels: experience

Attachments: GIF File rep.gif    
Issue Links:
Duplicate
is duplicated by MCPE-20779 The Xp bar is not refreshed unless yo... Resolved
is duplicated by MCPE-21750 Experience Bar is Incredibly Slow to ... Resolved
is duplicated by MCPE-21889 Issue with summon xporb Resolved
is duplicated by MCPE-22201 XP Bar Not Updating When Killing Mobs Resolved
is duplicated by MCPE-22351 Xp bar , beds , graphic Resolved
Relates
relates to MCPE-20607 No XP level up sound Resolved
Confirmation Status: Confirmed
Platform: Windows
CHK:
ADO: 59949

 Description   

Exp bar is not updated after sending UpdateAttributesPacket, but if i send TextPacket or change player inventory it updates successfully. This bug affects only experience, other things like hunger and health works fine. Tested on pmmp, nukkit, minet, local server.

Steps to reproduce:
1. Send UpdateAttributesPacket with exp level more than player have
2. Notice that it won't update
3. Send message to player and notice that bar updated

UPDATE
You can also test it on local server.
1. Host server on first device and connect from second to it.
2. On first device type
/xp 1L second_device_name
3. See that exp bar don't updates



 Comments   
Comment by Stephen Smith [ 20/Jun/17 ]

Yeah I've noticed that anything which changes the hotbar at all, even the durability of an item being lowered, also causes the xp bar to update.

Not a gamebreaking bug, but interesting.

Comment by Matt Smith [ 11/Jun/17 ]

Only seen since 1.1 for me. Attacking again with a sword or changing the active item through the hotbar, also causes an xp bar update. I can punch mobs for quite a while with my hand without an update though.

Comment by [Mojang] Mega_Spud (Jay Wells) [ 27/Apr/17 ]

Affects hosts since 1.1.* beta. Xp bar does not update (you can open and close the inventory to update it)

Comment by Jonathan Hanzel [ 24/Feb/17 ]

Cannot reproduce on two Apple iPad mini devices, both are running iOS 9.3.5

Comment by Niclas Olofsson [ 22/Feb/17 ]

So the bug seems to be a gfx issue. Any type of action that triggers a redraw will update the level-text, otherwise not. I can reproduce it on MiNET if I don't use a command (since that will redraw the screen when exiting the chat).

Comment by Niclas Olofsson [ 22/Feb/17 ]

I just tested this with MiNET-.

command.cs
[Command]
public void Xp(Player player)
{
	player.Experience += 0.1f;
	player.ExperienceLevel += 1;
	player.SendUpdateAttributes();
}

Works just fine,

Generated at Sat Jan 11 15:25:53 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.