This issue happens when the hunger value of a food item is reduced to 0 for a player while not being 0 in the base code. (usually this happens when a mod changes food values for a specific player and not the server).
When a player eats a food item meeting the above conditions, the server properly registers that the food restored 0 hunger but the client instead shows that the normal unmodified hunger value was restored. The reason for this seems to be because the server doesn't know it needs to validate the client's food bar since from its end no hunger values were changed even though food was eaten. The client then only updates when either something else changes the player's food value server side (like exhaustion) or is dealt starvation damage.
This bug was discovered using Fabric Loader with the Origins Mod
Note that this is a synchronization issue with Minecraft server/client, not an issue from the mod. This bug happens when any situation meets the above criteria.
If you want to test with the specific Origins datapack that was tested and checked by both Origin Datapack developers and the Origins Mod developers to see how the bug works, please contact me.
Comments 4
The 2 parts of this bug, the server and the mods aren’t in control of Mojang (except the server are Realms)
It a problem in the mod/server and this isn’t the place to report it
When I say server/client I'm talking about Java Edition singleplayer. Singleplayer uses the server/client model, both run by the player's PC. It is impossible to recreate this on vanilla because you can't recreate the problem I've described without modifying the amount food restores for only one player, which is impossible to do without some type of modification. I have since gone and tried this bug on other mods and every single one runs into this issue. It would be very unlikely that every single instance where this is possible the creators of every single mod out there made the same mistake.
Thus I'm almost certain this is a vanilla minecraft issue. This is a bug with the source code, though as it isn't run into via pure vanilla gameplay it should be very low priority. It is a bug though, and this is the right place to post bugs in minecraft source code.
please try in vannilla minecraft because it could be a bug in a mod you had loaded. also how fast was your connection to the server you noticed this on?