CreativeMD / Spice-of-Life-Onion

Motivating people to explore new foods with the potato, not the stick.
GNU Lesser General Public License v3.0
2 stars 4 forks source link

Benefit effects stay even when diversity drops below their threshold #25

Closed LeonarthCG closed 3 weeks ago

LeonarthCG commented 3 months ago

I was testing this mod when I noticed that resetting the food list through /solonion clear does not remove effect-based benefits. I figured it would be an edge case with the way clearing the list works, but it seems to be a more widespread issue.

Looking further into it, I did see that lowering the player's food diversity does not get rid of effects at all. Even though they stop being listed under active benefits, the effects will simply not go away.

For attributes, Max Health does decrease when the diversity drops. However, the players get to keep their current health until they get damaged. I would expect the current health to go down accordingly with the lowered max health, but I think this is not as big a concern as the effect case. Other attributes work fine.

In both instances, dying does do away with the benefits that should no longer be applied, regardless of the state of resetOnDeath. Effects that are applied even though no longer active also go away when drinking milk.

TL;DR: I would expect lowering your diversity below an active benefit's treshold to remove it, but that is not the case anymore.

I am running version 1.2.7 of the mod on Forge 1.20.1-47.2.17. I noticed that 1.2.3 was the last time (that I could see) that something related to this was changed, so I tried testing with that version. I can confirm effects were removed correctly on 1.2.3 and no longer were being removed on 1.2.4.


I also had a few suggestions/requests, but I figured it wouldn't make much sense to dump those all in the same issue, plus I'm not sure if you do take requests in the first place. So... do you? :)

CreativeMD commented 3 weeks ago

Thanks for your detailed report. Sorry that I took me so long to respond. Fixed this issue in the newest version. Hope it works for you now.