Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
TristonWasik opened this issue May 16, 2022 · 10 comments
Open

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

TristonWasik opened this issue May 16, 2022 · 10 comments
Labels
compatibility a problem with compatibility with other mods

Comments

@TristonWasik
Copy link

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

@juliand665
Copy link
Collaborator

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?

@juliand665 juliand665 added the compatibility a problem with compatibility with other mods label May 17, 2022
@TristonWasik
Copy link
Author

TristonWasik commented May 18, 2022

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.

@juliand665
Copy link
Collaborator

juliand665 commented May 19, 2022

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.

@ghost
Copy link

ghost commented May 26, 2022

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

@ghost
Copy link

ghost commented May 26, 2022

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

@border999
Copy link

border999 commented Jun 3, 2022

@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.

@border999
Copy link

@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.

@TristonWasik
Copy link
Author

@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!

@funnycubeguy
Copy link

Still an issue... 1.20.1

@rubyrobotic
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility a problem with compatibility with other mods
Projects
None yet
Development

No branches or pull requests

5 participants