Spice of Life: Carrot Edition

Spice of Life: Carrot Edition

55M Downloads

[Bug] Max Hearts visually set to 10 when changing dimension.

grundyboy34 opened this issue · 11 comments

commented

Steps.

  1. Config to default 5 max hearts
  2. Build nether portal
  3. Travel through nether portal
  4. Hearts will now show as max of 10 until you relog/restart.
commented

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.

commented

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.

commented

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?

commented

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.

commented

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.

commented
commented

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…

commented

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)?

commented

Yes I just did it with SoL: Carrot, AppleCore, and NetherPortalFix
Here's what I did.

  1. Make a new twitch profile with those 3 mods.
  2. Run once.
  3. Change SoL: Carrot config to start with 5 hearts.
  4. Launch again, start survival world with cheats on.
  5. Goto creative mode, make nether portal.
  6. Swap back to survival.
  7. Go through the portal to the nether.
  8. Go back through the portal to the overworld. (Hearts will now show 10 max)
commented

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.

commented

It seems that scaling health does not have this problem, maybe what they are doing to increase health doesnt break it.