yeelp / Scaling-Feast

A simple, balanced way to increase your maximum hunger in Minecraft over the course of a world.
MIT License
0 stars 1 forks source link

[1.12.2] Max Hunger can go below the lowerbound if you had Max Hunger Attributes from other means. Can lead to a crash if you have 0 or less Max Hunger. #114

Open SonicX8000 opened 3 years ago

SonicX8000 commented 3 years ago

Minecraft: 1.12.2 Forge: 14.23.5.2855

Mods: 5 AppleCore-mc1.12.2-3.4.0 AppleSkin-mc1.12-1.0.14 jei_1.12.2-4.16.1.302 scalingfeast-1.8.2 solcarrot-1.12.2-1.8.4

Report: https://hastebin.com/noliwedola.csharp

=====

You can go below the max hunger lowerbound if you have Attributes from other means, such as Quality Tools or Spice of Life: Carrot Edition and lower your Max Hunger from Exhausting Apples, Death, or by Starving. Is there any way to ONLY lower max hunger if the hunger boosts were gained from eating ONLY Hearty Shanks?

Also... if you somehow get 0 or less Max Hunger... the game crashes. This is possible due to having quality tools give you a high attribute boost, lower max hunger and then un-equip the items giving the attribute boost. Can prob also do this via the Hunger Minus Potion Effect.

yeelp commented 3 years ago

Notes to self: For https://github.com/yeelp/Scaling-Feast/blob/3bb5b628b2264376a1f8cdff63d11188f49271b2/src/main/java/yeelp/scalingfeast/handlers/GenericHandler.java#L28

Set priority to LOWEST, bound evt.maxHunger below at 1