Reset "Fatigue" after sleeping.

Started by Veyas on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Reset "Fatigue" after sleeping.

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.

Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How is the fatigue value…
Sun, 02/05/2023 - 14:10

How is the fatigue value stored? is it a variable or an NBT tag?

Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Fatigue is Player_Lifetime…
Sun, 02/05/2023 - 19:25

Fatigue is Player_Lifetime variable.