-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eidolon:Repraised Compat (Dev to Dev) #30
Comments
Unfortunately there is no real solution to adding support for all health stacking mods since it is basically required to override vanilla heart renderer with your own. This means that any mod that tries to follow vanilla's heart rendering convention with separate rows will not work as expected or their renderer will not run at all like is the case with Eidolon and there is no real way to detect if a mod has done this without checking if the mod is present.
colorful-hearts/forge/src/main/java/terrails/colorfulhearts/forge/compat/EidolonRepraisedCompat.java Lines 25 to 27 in 0608541
I have added an API for any kind of "effect-like" heart types where a mod just provides their own "alternating" HeartDrawing instances for health and/or absorption to OverlayHeart and everything else is handled internally by rendering those hearts on top of colored hearts. This is what I have done for the chilled effect from Eidolon as you can see here colorful-hearts/forge/src/main/java/terrails/colorfulhearts/forge/compat/EidolonRepraisedCompat.java Lines 48 to 50 in 0608541
After rechecking how ethereal hearts are rendered I just realized it is actually pretty simple and can be added by subscribing to the post render event provided by Colorful Hearts. Line 43 in 0608541
Ethereal hearts seem to render after health and absorption hearts, so just assuming that the highest amount of rows is 2 (with health and absorption both having 10 or more hearts), it should be pretty easy to handle it. I initially assumed that you rendered ethereal hearts between health and absorption which would make this more complicated as I would need to add a way to move absorption hearts, but since they are just a thing that renders above it is pretty straightforward. I'll look into adding a compat on my side since I already added it for chilled hearts and it kind of is my fault since these kinds of mods break custom overlays. Recently I've been trying to make the mod compatible with custom overlays from other mods as much as possible since most of these types of mods do not bother adding support giving most users a bad experience. |
Adding support was actually pretty simple as you can see here 485fcf5. I just do the same thing as you do in Eidolon but with it considering that there's only max 20 hearts for absorption and health. If you want to, I could remove the compat and let you handle it on your own side since the overlay does run if I do not cancel it. You would just have to check if any heart stacking mod like Colorful Hearts is installed using something like But as you can probably see in my implementation of ethereal hearts, I did not put in the vanilla offset that decreases vertical spacing between heart rows when there's many so that it saves on vertical space. Since Eidolon only has up to 20 hearts afaik (10 from helmet & leggings and another 10 from chestplate) I saw no need for this since there's only a maximum of 4 rows of hearts with health and absorption. |
It's a clone of #23 in a way, but that one talks only about chilled hearts (and it seems fixed?) but ethereal hearts don't seem to draw at all with this mod.
Is there a way we can co-op to make both hearts more compatible? It's mostly legacy code from the former author with little patches to make it work with current overlays, so you'd be the expert on the topic.
Not sure on how much it's only on your end and how much i can help, but if i can avoid forcing all health stack mod to need explicit compat, as you had to, it would be nice
The text was updated successfully, but these errors were encountered: