This pack displays the health of a mob next to its name, when attacked.
Simply download the datapack and drop it in your world's "datapacks" folder and type /reload in game. If you intend to use this in survival, click on settings and ensure the "apply to all mobs" box is ticked. If you intend to use this in a map uncheck the box and give mobs you want to display the health of a tag of "cw_hp_disp"
Since we know the length of the json text component before the name, calculated based on the magnitude of the values present, a macro command can slice the CustomName string to remove the last display and then simply append a new value from a text_display entity.
Cloud Wolf 🔨 |