1
Problem with bossbar appearing empty in my Datapack
I created a boss data pack that summons a boss with a bossbar corresponding to his health. However, the boss bar appears to be empty when you spawn him in, even if i set the bossbar value to 900 (the set max value for the bossbar and the boss health). And when I try to get the health value from the boss(A Wither Skeleton), It says "Can't get value of BossHealth1(the value I was using to get the health of my boss) for 5eb69fd3-75e4-43c3-b194-c7b18363a150; none is set". I am guessing that you can't get the health values from mobs as in 1.14.4.
I couldn't get any answer so i decided to ask here.
If you have an answer, then thank you in advance.
I couldn't get any answer so i decided to ask here.
If you have an answer, then thank you in advance.
4
The command that I also used to show the boss bar was
execute at @e[type=wither_skeleton] run bossbar set destroyer:bossbar players @a[distance=..60]
execute at @e[type=wither_skeleton] run bossbar set destroyer:bossbar players @a[distance=..60]
The command i used was
execute if entity @e[type=wither_skeleton,limit=1] run execute store result bossbar destroyer:bossbar value run scoreboard players get @e[type=wither_skeleton,limit=1] BossHealth1
execute if entity @e[type=wither_skeleton,limit=1] run execute store result bossbar destroyer:bossbar value run scoreboard players get @e[type=wither_skeleton,limit=1] BossHealth1
What is the command you use to get the health (and store it)?
Have you done /bossbar set players <@a>?
