220.127.116.11 Beta, 1.17.30, 18.104.22.168 Beta, 1.17.41 Hotfix, 1.18.2 Hotfix, 1.18.12 Hotfix
The BossEvent packet doesn't appear to be fully implemented.
The color and overlay of the boss bar appears to be ignored and instead only uses the default color (purple). I'm not aware of there being an alternative to set the color of the boss bar.
The bossbar also requires an entity to be in the world, which I think is part of the reason why this info is ignored. For the sake of parity I think that it'd be a good idea to not require an entity for spawning a bossbar, but that's most likely better suited in a different issue.
Steps to Reproduce:
- Send an AddEntity packet
- Send a BossEvent packet (with the entity id of the AddEntity packet) and set one or more of the ignored info I described (color, overlay)
The BossBar ignored the info I described.
The BossBar uses the info in the BossEvent packet.
Edit for 1.18:
1.18 has finally implemented color support (see
MCPE-46047 ). However, the overlay is still ignored.