Diet (Fabric/Forge/Quilt)

Diet (Fabric/Forge/Quilt)

6M Downloads

Values not changing

Late-Night opened this issue ยท 8 comments

commented

as the title says, the values don't seem to move when i eat anything
i've tried foods from mods and vanilla foods alike, and nothing changes

commented

I have run into this issue as well as of yesterday. The version is 1.16.5, I'm in a cave and need to eat. I have the Farmer's Delight mod installed and eat some raw pasta, then I get the Hunger debuff and bam, diet bars are greyed out and won't fill back up. (I have not been able to recreate this)

commented

I was able to reproduce it, but only by triggering a bug in Enigmatic Graves(v1.1) that caused my death to be mishandled. I think probably event data about the death is getting lost and then Diet sets the Active flag incorrectly based on bad event data.

Going through the same steps without any grave mod installed did not result in Diet being deactivated. This does not seem to be unique to this grave mod, although it was easiest to reproduce with it. It also affected E6 0.5 which had Gravestone Mod

Maybe adding some kind of null check on the active flag could resolve it, or doing the enable/disable in server config instead of per-player.

Steps to reproduce:

  1. Start forge 36.1.31 instance with Diet v0.33 and Enigmatic Graves v1.1
  2. Start new singleplayer world
  3. Die(used /kill @s)
  4. Press 'Title screen'
  5. Reopen the world, and hit respawn, this will trigger a bug in Enigmatic Graves that makes you not respawn correctly
  6. Exit the game and remove Enigmatic Graves from the instance to resolve the bug from it, otherwise Diet menu just does not appear at all since playerdata desyncs.
  7. Open the game, rejoin the world, and respawn, Diet will now be deactivated for the player(greyed out, eating has no effect on diet) and inspecting playerdata shows Active flag is set to 0

Here is the server config if it affects anything https://pastebin.com/PNTWpLDM

commented

Have had a few players playing on Enigmatica 6(since 0.5.0) complain of this issue(which is that the Active flag gets set to false in their playerdata). Haven't narrowed down what event caused it, one claims it was an issue since they started the pack but that doesn't seem possible looking at the code. Others had it deactivate after some time playing. Would guess it happens on the player clone event since that seems to be the only place you ever set the flag outside of server commands. Maybe a grave mod or dimension mod, or keepinventory. I'll see if I can narrow it down more.

Forge version: 36.1.16
Diet version: 0.32 and 0.33

commented

I've made a couple of tweaks to the code in an effort to resolve this bug or, failing that, isolate the cause. I'm thankful for @landretk investigating and outlining steps to reproduce the error as it was very helpful to discover possible solutions. While I'm skeptical that all the reports I've gotten for this issue can be explained by corrupted player data, the solution I've implemented at least solves the one above that I was able reproduce. So for now I'm closing the issue; however, I do welcome anyone to comment further if they are still encountering this problem after the latest release.

commented

diet ver. 1.16.5-0.24
forge ver. 36.1.4
minecraft ver 1.16.5
and i have about 250 mods, i really don't feel like slogging through all that looking for an incompatibility
crash-2021-04-07_17.39.05-client.txt
so here's a crash report with all my mods

commented

There's two steps you need to do:

  1. Test with only Diet installed and see if your issue still occurs.
  2. a) If it does, list the exact steps you took to test the issue in-game.
    b) If not, you need to find which mod is causing the issue.

The reality is that I cannot reproduce your issue so you'll need to provide some more testing on your end in order for me to investigate further, otherwise we're at an impasse.

commented

might be crafttweaker
specifically, the way Crucial 2 has it set

commented

Please list your Diet version, Forge version, and Minecraft version.
Also, try and test with only Diet installed to isolate any mod incompatibilities.