Spice of Life: Carrot Edition

Spice of Life: Carrot Edition

55M Downloads

Some eaten foods resetting when re-entering the world

Nevrai opened this issue · 16 comments

commented

Some foods are occasionally resetting, for whatever reason. It happened when I closed and relaunched my game a couple times but doesn’t always happen. I believe it also happened whilst I was still in the world, but I’m not 100% sure about that. Not all the foods reset. Some of the earliest foods I ate were still marked as eaten, whereas some of the most recent ones were reset, even if it was still a little while ago. I had to temporarily enable cheats to get the foods back so I could eat them again.

Versions

  • Modpack: Enigmatica 2: Expert Skyblock
  • Minecraft: 1.12.2
  • Forge: 14.23.5.2860 (latest for 1.12.2)
  • Spice of Life: Carrot Edition: 1.8.4 (latest for 1.12.2)
  • AppleCore: 3.4.0 (latest)
commented

Oh wow this is an old version! Thanks for the detailed report. I'd love if you could gather a log from a session where this happens; maybe there are errors being printed somewhere in it?

commented

This has happened one more time since creating this issue, but it doesn’t always happen when re-entering the world or restarting the game. I’ve restarted the game a few times since making this, and it has only reset once. And it’s quite odd that when it does happen, it doesn’t reset all the foods—only some of them. It seems like it resets the last couple foods you’ve eaten.

Here is the log file that I saved the last time this happened: latest.log

However, I did not find anything related to SoLCarrot in the log except for the mod being loaded.

Sadly, I don’t think there’s anything in the log that can help. Even though this doesn’t always happen, it’s pretty frustrating when it does as I’ve had to cheat in food items several times. However, I’m sure it would be difficult to fix this when there’s no way to figure out what causes it. And it is in 1.12.2, so it’s a pretty old version, I suppose.

commented

Ah damn, that's pretty annoying. When loading a food list, we do discard the foods whose items are no longer registered, but we emit a warning to the log when that happens, so it would show up in here. That makes me think something else is going on…

Have you noticed any commonalities among the foods that get lost? If you could find a reliable way to reproduce it, you could also start removing mods to e.g. see if it still happens with just SoLCarrot and nothing else, I imagine it wouldn't. But that would be a lot of work if you can't reliably trigger the issue, hmm.

commented

I believe I can verify that it only happens with recently eaten foods. I started my game up, and all the foods I had eaten were marked as eaten except the poisonous potato, which is the one food I had most recently eaten. I ate it again, and it gave me an extra heart, and I don’t believe I had four hearts before, so I think that it only resets the foods but not the hearts. I don’t think there are any commonalities aside from the foods always being the most recently eaten foods, as it sometimes is vanilla foods, sometimes Actually Additions foods, sometimes Pam’s foods, etc.

It’s still quite frustrating, but I get this is an old version. Nonetheless, if you find any way to fix this, that’d be much appreciated, although I’m sure that’s not an easy task considering there’s no reliable way to troubleshoot this.

I looked through the latest.log again, but there’s nothing that mentions SoLCarrot at all except the usual, so I don’t understand why this is happening. This bug occurs quite frequently; not every time I load the world/start my game but most of the time.

commented

Very strange! The hearts are only ever computed directly from the foods you've eaten, so there's no way a food would get counted twice for hearts. Your hearts don't just get increased, they get update to have the right amount. Can you maybe send your playerdata file (.dat), if you know where to find that?

commented

Hi! I've been having this issue also and am curious if it's possible to be fixed. Should I just send my player.dat here?

commented

Hey @namirin1! It's great to have another person reproducing this issue. If you can find your playerdata file, that would be great (or if you're playing singleplayer, just send your level.dat). Additionally, I'd appreciate if you had any specifics on the bug. Is it always the same foods that are forgotten? Are they vanilla or modded items? Do you keep the hearts?

commented

Hi! sorry for being gone for so long I don't really use github at all, I am playing singleplayer, here's my level.dat: https://namirin1.s-ul.eu/EA3WyHy8

for some specifics, I haven't really fully tried to debug it yet but from what I can see if the food is eaten then quit the world instantly the info seems to never get lost, both vanilla and modded items are affected. also a temporary fix I've found is to just spam /foodlist sync but not needing to do that would also be nice.

commented

Thanks for your level.dat and other info! I had a look at the food list in there and everything looks as it should be. The fact that vanilla items are affected as well rejects the hypothesis that it's something about items not being registered and thus getting discarded.

To be clear, by "spam /foodlist sync" you mean using the command every time you notice it's desynced, or using it many times until it's fixed?

What I'm getting is that: you're (seemingly) randomly losing some of your acquired max health because the client forgets about items that you've eaten (or only ones that you just ate?). While in this state, both the food book and tooltips show that the item in question has not been eaten yet. And using /foodlist sync fixes it?

commented

i am using /foodlist sync every time i eat a new food and it seems to never "forget" the food ive eaten after i use the command, if I don't use it I randomly just lose the food log after a random amount of time I can't seem to pin down but its from a minute to potentially 20-30, or not lose it at all if im lucky

commented

And if it loses the food, /foodlist sync or leaving and rejoining does not bring it back?

commented

it does not from what I've seen, if it is lost it is lost for good

commented

Interesting! So it sounds like the food is sometimes only registering on the client side, and either eventually gets overwritten by server data or somehow ends up syncing anyway. That's weird because the other effects of the food (like restoring hunger) I assume are syncing as normal, meaning that the server is definitely registering the food being eaten…

commented

Yes! the potion effects, saturation, hunger, whatever works as usual, just the solcarrot thats a bit broken

commented

Very strange! I truly have no idea how that could happen. The only thing I can come up with to further track it down is to figure out which other mods need to be present for it to break like that—rare bugs like this are almost always incompatibilities between two mods. Unfortunately, that is a ton of effort to go through, especially for an outdated version :/

commented

:(, I dont know why I havent done this yet but ill probsboy just setup a small command block thing to constantly run foodlist sync, its far less effort than what you'll have to go through i can only assume, thank you for your help though!!