Topic category: Help with Minecraft modding (Java Edition)
I'm doing Fatigue based statistic that is reset after sleeping.
My problem is that I can't do it with either "player wakes up" and "player goes to sleep".
With player goes to sleep it apply instantly and doesn't work in multiplier somehow.
I tried to check for the night/thunderstorm and then delay it for 102 ticks and check for day and no thunderstorm, then reset Fatigue. But it was kinda messy and buggy.
Player wakes up apply instantly after exiting bed, so I thought it will work well, but it doesnt. I set it to trigger with daytime and no thunderstorm. But it doesnt work... kinda.
It doesn't change anything except food value that is also applied with sleeping procedure, but after few seconds/eating something it reset to old value, like its only visual bug.
I have not idea what to do with it anymore.
How is the fatigue value stored? is it a variable or an NBT tag?
Fatigue is Player_Lifetime variable.