Somnia Awoken

Somnia Awoken

27.3k Downloads

Togglable Fatigue system

Adzeiros opened this issue ยท 1 comments

commented

Is your feature request related to a problem? Please describe.

I have attempted to manually disable the fatigue system by making the fatigue growth rate 0.0 and the sleep fatigue loss rate 0.0 as well... I also set fatigue effects to false...

and set fatigue needed to sleep to 0... However, after sleeping, the fatigue meter changed from 0.0 to NaN.

Now, whenever I try to sleep it says "you are not tired enough to sleep"... I have reset the config to increase fatigue per tick, but that did not fix the issue. Fatigue stays on NaN forever regardless of config...

I am attempting to uninstall and reinstall the mod in hopes this fixes the NaN issue, as I am not sure where you save the fatigue levels in order to manually fix it...

Describe the solution you'd like

Add in a config option that makes the mod completely ignore fatigue altogether, you can still sleep anytime (according to the configs times) and still simulates the world.

Additional context

No response

commented

So it looks like the NaN was a result of dividing the fatigue replenish rate by the fatigueRate, which was 0, and apparently diving a double by zero in java results in infitity, huh. That should be fixed now.

I've also added a "master override" config option named enableFatigue. Setting it to false will disable all fatigue logic completely.