execute store result bossbar ice_king max run attribute @e[tag=ice_king,limit=1] max_health get
execute store result bossbar ice_king value run data get entity @e[tag=ice_king,limit=1] Health
execute if entity @e[tag=ice_king] run bossbar set ice_king visible true
execute at @e[tag=ice_king] run bossbar set ice_king players @a[distance=..50]
execute as @e[tag=ice_king] if score @s time < @e[tag=ice_king,limit=1,sort=arbitrary] time run function survivalplus:bossbar/multibossfix/ice_king

#execute if score hardmode hardmode matches 1 at @e[tag=ice_king] run effect give @e[distance=..10,type=stray,tag=!boss] resistance 1 0
#execute if score hardmode hardmode matches 1 at @e[tag=ice_king] run particle snowflake ~ ~ ~ 8 8 8 .005 5 normal