Foren » Help » How do you make a bossbar appear only if you are in a certain distance of an entity in 1.14?

ch4nee
Avatar

I have been trying to find answer on google for a whole day,so I would be grateful if someone in here could help me out. I have summoned a mob with tag "deathlordazrax",made a bossbar for that mob,put 3 separate command blocks on REPEAT with levers on each of them,heres the photo...far right command block have command:

/execute store result bossbar minecraft:deathlordazrax value run data get entity @e[tag=deathlordazrax,limit=1] Health

middle command block:

/execute if entity @e[tag=deathlordazrax,limit=1] run bossbar set minecraft:deathlordazrax visible true

and the far left command block is:

/execute unless entity @e[tag=deathlordazrax,limit=1] run bossbar set minecraft:deathlordazrax visible false

and that works perfectly,when mob is alive,bossbar is visible,when mob is dead,bossbar is hidden...but what I want is that bossbar shows only when PLAYER is few blocks near that specific mob,I dont want it to be shown all the time... I tried putting another 2 command blocks on repeat with these commands,photo: First command block:

execute if entity @p[distance=..10] run bossbar set minecraft:deathlordazrax visible true

Second command block:

execute if entity @p[distance=10..] run bossbar set minecraft:deathlordazrax visible false

and that works (well partly,it doesnt remove the bossbar when mob is dead) only if PLAYER is near those command blocks not near the mob. I am new to command blocks,so please if you can just write me a code that I can copy,paste it would be most appreciated

desmond
Avatar

Very efficiently written information. It will be beneficial to anybody who utilizes it, including me. Keep up the good work. For sure i will check out more posts. This site seems to get a good amount of visitors. Nft games

wowop50521
Avatar

sell my trailer Holland, MI RV Wheel Estate offers a free way to sell your RV in Holland, MI. We appraise each RV individually based on condition, age, and other factors to give you ... https://rvwheelestate.com/

bimam95
Avatar

junk yards buffalo ny Are you looking to sell your junk car for cash in Buffalo, NY-Buffalo Junkyard provides the best cash offer with free towing service in Buffalo and ... https://bobscashforjunkcarsbuffalony.com

desmond
Avatar

I think this is an informative post and it is very beneficial and knowledgeable. Therefore, I would like to thank you for the endeavors that you have made in writing this article. All the content is absolutely well-researched. Thanks... garbage chute door closer

wowop50521
Avatar

Watch and download Korean drama, movies, Kshow and other Asian dramas with english subtitles online free on Dramacool for everyone or DramaCool9. dramacool9

bimam95
Avatar

it is good as well as meanful. it is awesome weblog. Connecting is extremely helpful point. you've truly assisted many individuals that go to weblog and supply all of them usefull info. Sunset boat nha trang

deliacoates
Avatar

Take a look on what do they contribute and gives us by increasing mixture of entertainment in way of adult Education Endorsement. Visit us porn cialiscock sex viagra adult porn adult sex porn cialis cock sex viagra adult porn adult sex

xatigip985
Avatar

Make sure you excuse my my English speak, i’m simply schooling. I very much like your web site greatly, I realize it quite fascinating and that i saved a bookmark in my personal web. Malta things to do

carol4
Avatar

That is really nice to hear. thank you for the update and good luck. ゴルフボールケース

xatigip985
Avatar

100% Original Triple-T by DR Azlan. Dapatkan produk Triple Tea by Dr Azlan secara online dengan harga promosi. Mudah, cepat, dan dijamin selamat sampai. triple tea Dr azlan

goxah55535
Avatar

Canoeing and kayaking in Las Vegas will not only give you a relaxing moment, but it will also give you the freedom for other water sports and sightseeing. setubal district kayak rental

deliacoates
Avatar

Take a look on what do they contribute and gives us by increasing mixture of entertainment in way of adult Education Endorsement. Visit us porn cialiscock sex viagra adult porn adult sex porn cialis cock sex viagra adult porn adult sex

geekstation
Avatar

Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. Cheap vape kits online

geekstation
Avatar

I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business. kamagra

geekstation
Avatar

Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. cenforce 100

geekstation
Avatar

thanks for this usefull article, waiting for this article like this again. https://ictcatalogue.com/create-account-sportybet-ghana/

geekstation
Avatar

thanks for this usefull article, waiting for this article like this again. video production dubai

geekstation
Avatar

I high appreciate this post. It’s hard to find the good from the bad sometimes, but I think you’ve nailed it! would you mind updating your blog with more information Buy Unique Things online

geekstation
Avatar

Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts. seo agency near me