4
Bossbar Help Needed
so, i want to have a dragon, called Jörmungandr. with 10k healh. as a challenging event for a server im in. currently i have the command:
"/summon minecraft:ender_dragon ~ ~63 ~ {DragonPhase:0,CustomName:'[{"text":"Jörmungandr"},{"text":"l","underlined":false}]',CustomNameVisible:1,Health:10000,Attributes:[{Name:"generic.attack_damage",Base:100.0F},{Name:"generic.knockback_resistance",Base:1.0F}]}"
this summons a dragon, with the name, Jörmungandr, with 10k health. but it doesnt have a bossbar. any help? thanks :D
"/summon minecraft:ender_dragon ~ ~63 ~ {DragonPhase:0,CustomName:'[{"text":"Jörmungandr"},{"text":"l","underlined":false}]',CustomNameVisible:1,Health:10000,Attributes:[{Name:"generic.attack_damage",Base:100.0F},{Name:"generic.knockback_resistance",Base:1.0F}]}"
this summons a dragon, with the name, Jörmungandr, with 10k health. but it doesnt have a bossbar. any help? thanks :D
4
Here
so make a bossbar using bossbar command
/bossbar add <id> {"Jörmungandr"}
the id can be anything
then set the value of the bossbar
/bossbar set <id> max 10000
/bossbar set <id> value 10000
/bossbar set players <selector>
selector can be @a, @p, etc
now place a repeating command block and set to always active
then type in this command:
execute store result bossbar <id> value run data get entity @e[type=minecraft:ender_dragon,name="Jörmungandr"] "Health"
that should hopefully work
so make a bossbar using bossbar command
/bossbar add <id> {"Jörmungandr"}
the id can be anything
then set the value of the bossbar
/bossbar set <id> max 10000
/bossbar set <id> value 10000
/bossbar set players <selector>
selector can be @a, @p, etc
now place a repeating command block and set to always active
then type in this command:
execute store result bossbar <id> value run data get entity @e[type=minecraft:ender_dragon,name="Jörmungandr"] "Health"
that should hopefully work
the first part worked but the execute command isnt working. it give an output of
execute store result bossbar dboss1 value run data get entity @e[type=minecraft:ender_dragon,name="Jörmungandr"] "Health" <--[HERE]
Any idea why this happens?
execute store result bossbar dboss1 value run data get entity @e[type=minecraft:ender_dragon,name="Jörmungandr"] "Health" <--[HERE]
Any idea why this happens?
maybe you have a space. there should be no space after the "health"
Try killing the dragon and checking if the portal to the overworld opens.
