Classic and simple status bars

Classic and simple status bars

6.4k Downloads

Health is always X/20 even if X>20

maculator opened this issue ยท 8 comments

commented

Health bar does not show the real maximum health. Not sure if this is intended or a bug.
Here is a screenshot:
https://i.imgur.com/yGGSDca.jpg
I got 20.5 ouit of 20 health. It should be 20.5/20.5

commented

Sorry, this part is a bit messy. Some values are set to integers, but others are set by me to retain decimals. This is indeed an error

commented

I found the problem because the maxhealth is of type int

commented

Use v1.0.9

commented

It works, thank you, good mod!

commented

It works, thank you, good mod!

You're welcome, this is what I should do. I hope it's perfect

commented

image

I will upload the new version right away. Now the problem has been solved

commented

image

I will upload the new version right away. Now the problem has been solved

As shown in the picture, if you remove the Coleoptera equipment, the health column will display 20/20, which is for correct display, but the real data, the health value is still 25.9/20. If you find it, I just want to say it is not a bug

commented

I found that the type of vanilla armor value and armor toughness is an integer, so the decimal point is not displayed. Even the armor value of 1.8 will be displayed as 1 armor.

/give @s minecraft:elytra{AttributeModifiers:[{AttributeName:"generic.armor",Operation:0,Amount:1.9d,Slot:"chest",Name:"Armor",UUID:[I;1,2,3,4]}, {AttributeName:"generic.max_health",Operation:0,Amount:1.9d,Slot:"chest",Name:"MaxHealth",UUID:[I;1,2,3,5]}]}

image