Command Block Tutorial #282: Improved Custom Boss Commands in Minecraft (1.21.5+)
In this video I will show an updated version of how to make custom boss mobs that are boss bar that in sync with that mob's health.
Previous custom boss video: • Command Block Tutorial #113: Custom Boss C...
Commands:
Setting up the boss bar:
1. Impulse Command Block: /bossbar add boss "Boss"
2. Impulse Command Block: /bossbar set minecraft:boss color white
Removing the boss bar:
Impulse Command Block: /bossbar remove minecraft:boss
Activating the boss bar for the custom boss (Example):
1. Repeater Command Block: /execute store result bossbar minecraft:boss value run data get entity @e[tag=boss,limit=1] Health
2. Chain Command Block (Unconditional): /execute if entity @e[tag=boss] run bossbar set minecraft:boss players @a
3. Chain Command Block (Unconditional): /execute unless entity @e[tag=boss] run bossbar set minecraft:boss players
4. Chain Command Block (Unconditional): /execute as @e[tag=boss] store result score @s health run data get entity @s Health
5. Chain Command Block (Unconditional): /bossbar set minecraft:boss name [{"text":"Breeze Boss"},{"score":{"name":"@e[tag=boss,limit=1]","objective":"health"}}]
Summoning the custom boss (Example):
1. Impulse Command Block: /summon minecraft:breeze -533.95 0 -209 {Tags:["boss"]}
2. Chain Command Block (Unconditional): /execute store result bossbar minecraft:boss max run data get entity @e[tag=boss,limit=1] Health
Music:
Gaming Sound FX:
1. Monkeys Spinning Monkeys (Kevin MacLeod) - Gaming Background Music (HD):
• Monkeys Spinning Monkeys (Kevin MacLeod) -...
2. Hitman (Kevin McLeod) - Vanoss Gaming Background Music (HD):
• Hitman (Kevin McLeod) - Gaming Background ...