[Bug] Max Hearts visually set to 10 when changing dimension.
grundyboy34 opened this issue · 11 comments
Steps.
- Config to default 5 max hearts
- Build nether portal
- Travel through nether portal
- Hearts will now show as max of 10 until you relog/restart.
Okay so this used to happen with StatsKeeper as well until the PlayerChangedDimensionEvent was used to reset visuals.
Does this mod use that event? If not, adding it to reset the hearts to the right amount should fix the issue.
Hm, that might help, although I really can't know if I can't even reproduce the issue locally, and EntityTravelToDimensionEvent
(as it's now called) is actually sent of just before the entity changes dimensions rather than after, so I don't see how it even could help.
My main point, though, is that it works fine in a setup without extra mods, so if it breaks with those other mods around, I'm inclined to say it's on them to fix. For example, they might use an unusual teleportation strategy that results in the other events we're using to not get called—even if we worked around it, other mods wouldn't, so we'd just be endlessly fighting the symptoms rather than addressing the cause.
Sorry, I was unable to reproduce this locally, neither on the trip to the nether nor back. Which version of the mod are you using? Can you reproduce it with just SoL: Carrot (+ AppleCore) and no other mods?
I'll try again today. I was running a bit more more mods when this happened such as Tough as Nails, but didn't think any would interact in such a way.
I haven't had time to try a code fix, but I did find out more about the behaviour.
Going in and out of the Twilight Forest doesn't have this issue, but when going into the nether, and back again seems to make this happen every time.
Starting to think that NetherPortalFix may be causing it.
EDIT: Can confirm, disabling NetherPortalFix fixed the issue, so there is definitely an incompatibility there.
Ah yeah, that does appear to be fired later. It still shouldn't be necessary though; those other mods shouldn't be messing with dimension changes like that…
Interesting; I tried it with just SoL: Carrot, AppleCore, AppleSkin, JEI, HWYLA, and NetherPortalFix, and had no issues. Can you reproduce the issue with just those (or even less)?
Yes I just did it with SoL: Carrot, AppleCore, and NetherPortalFix
Here's what I did.
- Make a new twitch profile with those 3 mods.
- Run once.
- Change SoL: Carrot config to start with 5 hearts.
- Launch again, start survival world with cheats on.
- Goto creative mode, make nether portal.
- Swap back to survival.
- Go through the portal to the nether.
- Go back through the portal to the overworld. (Hearts will now show 10 max)
Thanks for the detailed steps! I was indeed able to reproduce the issue; I'm really not sure what was wrong earlier because it happens now with the same exact config values… perhaps I wasn't attentive enough. The issue does not seem to occur when you use a portal for the first time; maybe that's why I didn't notice at first.
I still maintain, though, that this is really an issue with NetherPortalFix for changing the way dimension changes work, which is bound to break other mods.