Hi, as the title said, I am trying to disable the hunger system using command blocks, so that the health system would resemble the health/food system of Alpha and Beta. This would only need to work for a vanilla single player survival world. I have done some research and as far as I can tell I need to use scoreboards but after that I have no idea. Any help or information will be very much appreciated!
very far from perfect, but the way I would imagine this is to have a scoreboard objective fullness for criteria food with a command testing if fullness is less than 4, then give a 1 second saturation effect which should keep fullness at around 4.
have another command testing if fullness is greater than 10, if so, give a hunger effect with a very high level. The time might need to be tweaked a little to try to eliminate the game's natural healing process by a full food bar.
I'm afraid as far as food goes, I think you'll have to make a separate scoreboard objective for each food item with the criteria of using each food item.
you can then test for if the player ate any food items and give an instant health effect based on which food the player ate.
You'll then have to reset the food scoreboard objective variables or else you will be healed constantly.
I can see this being very finicky, and might even not work at all, but it may.
Just create a repeating, always active command block with this command in it:
/effect @a saturation 1 255 true
The problem with that, is it will constantly regenerate health at an extremely fast rate, which isn't what it was like before.
I would disable the gamerule for natural regeneration, and create scoreboard objectives for each time a food item is eaten, and heal the player by a certain amount if they eat a particular item. That would probably be the closest, as well as using the command provided by EnderTheLord to ensure the food bar stays full.