The downsides to this system however, is ALL NAMETAG NAMES WILL BE OVERWRITTEN.Ī workaround would be to put but that would multiply the number of commands you have to create by the number of mobs you want to track. Less, if you only only want to test a smaller health range, or put all mobs with more than 20 health as ' 20+' or any other optimisation changes, etc.
If you know what you're doing, you should have a long chain of about about 150 chain command blocks and a repeat command block and mobs should have health bar as their custom name. Of course, you could just do plain numbers: scoreboard players set healthbar _ Īnd so on. scoreboard objectives add healthbar dummy
NB: You cannot use the health criteria on entities. Assign a scoreboard value based on a mob's health.