When using tools and weapons, the durability bar does not appear, even though the durability of the item gets decreased.
Reproducing the issue:
Pick a gold weapon or tool
Hit a mob or break some blocks with the tools
Eventually, the item will break after a few uses, but no durability bar is shown.
Observed:
The durability bar does not appear.
Expected:
The durability bar appears.
Code analysis (post-1.19.40)
Can be find in my comment below.
Linked issues
is duplicated by 16
Attachments
Comments 5
Just to clarify, anyone with a resource pack that contains a pre-1.19.40 ui_common.json file will probably still be affected to this. It doesn't mean that this ticket needs to be reopened, but just to prevent duplicates like MCPE-163774 to still happen after 1.19.40.
This issue has been sucefully fixed in 1.19.40.23 preview in the vanilla resource pack. However, any resource pack that contains a ui_common.json file (which has some of the coding for the durability bar) is highly probable to still be affected to this.
One of the pre-19.40 bindings in the codes of the durability bar has a part called 'binding_name_override'. After further looking, the binding has a different definition from the post-1.19.40.23 one, and can also be seen below:
1.19.30
"durability_bar": {
},
"bindings": [
{
"binding_name_override": "#progress_bar_visible",
1.19.40
"durability_bar": {
},
"bindings": [
{
"binding_name_override": "#touch_progress_bar_visible",
Notice how the 'binding_name_override' has changed from "#progress_bar_visible" to "#touch_progress_bar_visible". This explains how any resource pack that has that code included still triggers this bug.
Note that below these codes, there's also a code called "durability_bar_grabbed@durability_bar" that has the same binding_name_override, and like the one i showed above, depending of the version of the file you are using, it will also still trigger this bug. Both binding_name_override code definitions needs to be updated to make the durability bar appear again.
Bump