Is it possible to make a bossbar in Java Edition 1.12 or below?

I want to add a bossbar to one of the boss mobs in my map. But I'm working in 1.12.2.

1.13 has a /bossbar command, but this is a later version than the one I am working in. How can I make my custom bossbar in 1.12?


Solution 1:

Bossbars did not exist in 1.12−. What you have to do is (ab)use an existing mob that already has built-in bossbar.

You can use the Wither if you want a red bossbar, or the Ender Dragon if you want a purple bossbar. Unfortunately those are the only colours you may select.

You can add the tags {NoAI: 1b, Silent: 1b} to stop your mob from disturbing your gameplay.