Usually, a slice of cake can restore one hunger. If you have a cake of 7 slices, you can restore seven pangs of hunger at a time. A cake is quite an expensive food, and it takes time to make. However, it is worth your time as most of the other food items in Minecraft will only be able to restore up to four pangs of hunger at a time.