granny / Pl3xMap

Pl3xMap is a minimalistic and lightweight world map viewer for Minecraft servers using the vanilla Minecraft rendering style
https://modrinth.com/plugin/pl3xmap
MIT License
64 stars 85 forks source link

fix heart display on webmap when hearts are more than 10 #12

Open granny opened 10 months ago

granny commented 10 months ago

If you have more than 10 hearts, it stops displaying the hearts.

image

image

ydal251 commented 9 months ago

A simple workaround could be just extending the image used to generate the hearts on the web map. I've used the vanilla absorption heart colors here to extend the health range displayed correctly out to 40 (20 hearts). The map also currently doesn't display the temporary hearts added by absorption from golden apples or similar only permanent hearts

health

granny commented 9 months ago

That could work. The solution I was planning on going for is something like the Colorful Hearts mod where it's more dynamic/customizable. Wanted to do something similar with the armor hit points as well so this could be generalized as "improve the player nameplate"

ydal251 commented 9 months ago

Dynamic generation would be ideal compared to an image that just includes hundreds of health states, it unfortunately looks like you can't just drop this image in at /plugins/Pl3xMap/web/images/ on an existing installation and just use /pl3xmap reload to enable it live, and the extended image would have to be included before compiling for it to be used by the webmap.