mojira.dev
MC-124760

Boss bar text turns white after relogging

The bug

When creating a boss bar and setting its color the color of the text changes too as seen in

[media]

. But when you relog the text turns white as seen in

[media]

.

How to reproduce

  1. Use the following commands to set up the bossbar properly:

    /bossbar add test "Test"
    /bossbar set test value 100
    /bossbar set test color red
    /bossbar set test players @s

    → ✔ The text above the bossbar will appear red now

  2. Exit and reenter the world
    → ❌ The text will now be white

Linked issues

Attachments

Comments 4

Still affects 1.13-pre6!

It appears that the change of text color is unintended and happens as a temporary side effect of manipulating the boss bar using commands.

The culprit seems to be

net.minecraft.server.CustomServerBossInfo.getFormattedName()

where the boss bar's name isn't copied before it's manipulated and thus gets mutated (MCP names).

Still affects Release 1.15.1

It is also worth mentioning that running the following command after re-logging shows the correct color of the boss bar name:

/bossbar get <bossbar> value

A E

(Unassigned)

Confirmed

Text

/bossbar, boss-bar

Minecraft 18w05a, Minecraft 1.13-pre6, Minecraft 1.13-pre7, Minecraft 1.13, Minecraft 18w31a, ..., Minecraft 19w11a, Minecraft 19w11b, 1.15.1, 20w17a, 20w19a

Retrieved