Spice of Life: Carrot Edition

Spice of Life: Carrot Edition

57M Downloads

Player Must have food capability attached, but none was found.

TristonWasik opened this issue ยท 11 comments

commented

This error is thrown for a player if they die and the server crashes or gets restarted before they can click respawn. There was an issue before that covered this issue but it was closed. This issue has occurred to two different players on my Terralux: A new experience modpack on 4 different occassions now (crashes, due to the stardew armory mod).

Screenshot:
image

commented

Still an issue... 1.20.1

commented

Hi this happens to me when I added SoL to my vanilla world

commented

Seems my character was logged out while dead before I added the mod.

commented

Ooh, thanks for identifying a cause for this error! Unfortunately, this error being thrown means the player's food data has already been lost. The hope is that crashing will make MC restore from a state where the data was still present, and the alternative would be just silently losing all food data.

It's annoying that this makes it look like our mod is at fault, because I'm pretty sure it's not, but I don't think there's a better option for us?

commented

How is a food list data connected to the player? if a player dies it seems to not be attached to that player until they hit respawn, is there a way around that, as that could be a fix. (i'm not really sure how minecraft handles death events, or how ya'll are utilizing them).

At this point, the mod hard locks out any player from joining the game due to a corrupted player state, i think a warning for the player and wiping their food list would be far more optimal than what it is currently doing. The only way to fix it currently is to completely wipe out the playerdata so it's no longer corrupted, at which they're losing everything on them and a lot of other progress.

commented

Hm, actually you might be onto something there. I didn't really stop to think about it, but this might be reproducible with just our mod. If a player dies on a server, leaves instead of respawning, and then logs back in, that may well cause this to be thrown. That would also explain other unexplained Heisenbug reports.

commented

@juliand665 I have played with this mod for awhile. It only has this issue when the player dies. It also prevents the player from logging back into the world. I play on a singleplayer world that is not open to lan mind you. The mod modifies the value for a players health and seemingly is forgetting that value upon player death. I did not get a chance to hit the respawn button. The world closed the moment I died and I am unable to log back in. The only way I've found to fix this is to close the game remove this mod, then reopen the game and then the world.

commented

@Elfinslayer as I say above. You can get back into the world without wiping the player's data by removing the mod and opening the world without it in. The world will allow you in and then you can readd the mod.

commented

@border999 Yea I saw your reply. It's nice to have an alternative fix but unfortunately that's still not a reasonable long term solution. They know about the issue and seem to be planning on fixing it, until then we'll just avoid packs with SoL. Thanks though!

commented

had this issue on a server, player lost connection before being able to click respawn. attempts to clear food data with commands in the split second before the crash failed due to "An unexpected error occurred when trying to execute that command."
it's POSSIBLE that an nbt editor can be used to snip just the food data out, but you would need an nbt editor to do that. my admin team wiped his playerdata after getting copies of his items stored.

commented

Mesmo problema - arclight 1.20.1