VazkiiMods / Neat

Functional minimalistic Unit Frames for the modern Minecrafter
Other
71 stars 71 forks source link

Dynamic Max Health #116

Closed NathZen closed 1 year ago

NathZen commented 1 year ago

Hello, is it possible to modify the max health of an entity for above 1024?

I was using Orderly, but it was for 1.16.5 and it said it was ported from Neat. But now I'm moving to 1.19.2, which is Orderly not supported again, and I use Neat instead because this mod looks very useful. But the problem is, the health bar is capped at 1024.

Is it possible to set the max health into more than 1024? Or maybe can you limit the max HP into 1024 instead? The bar is overflowing 😆

Base Profile Screenshot 2022 11 26 - 08 12 28 11

Base Profile Screenshot 2022 11 26 - 08 12 53 10

Thank you

williewillus commented 1 year ago

the maximum health an entity can have in vanilla is 1024, I'm not sure how you're getting this to happen

williewillus commented 1 year ago

Additionally, Neat does query the entity's max health properly (it's not hardcoded): https://github.com/VazkiiMods/Neat/blob/a46ab527f9611819392a91eb924712701bbf3296/Xplat/src/main/java/vazkii/neat/HealthBarRenderer.java#L220

In this case an entity somehow has a current health higher than its max health, though I guess we can handle that better.