Minecraft 1.6.4, Minecraft 1.7.1, Minecraft 1.7.2, Minecraft 13w48a, Minecraft 13w48b, Minecraft 13w49a, Minecraft 1.7.3, Minecraft 1.7.4, Minecraft 1.7.5, Minecraft 14w11b, Minecraft 1.7.9, Minecraft 14w20b, Minecraft 14w21b, Minecraft 14w29b, Minecraft 1.8, Minecraft 1.8.6, Minecraft 1.8.7, Minecraft 15w32c
Linux Server, Windows 7 SSP/SMP with 64 bit Java
When standing within one square of a mob, even if separated by something like an iron fence, the hunger bar will deplete. The more mobs that occupy that square, the faster the hunger bar will deplete. This is presumably due to the game considering the mobs to be "pushing" the player, even though the player is not actually moved as a result(the location coordinates do not visibly change at all).
Steps to reproduce:
1) Trap a number(the more mobs, the faster the effect can be seen) of mobs in an enclosed space(preferably small, like 2x2 or 2x1).
2) Either stand directly within the mobs or against the far side of a block such as a glass pane or iron bars that has mobs on the other side so that you are less than a block away.
3) Make sure you are in survival mode.
4) In order to be able to more quickly observe the effect, ensure that your saturation is fully depleted.
5) Giving the mobs a couple blocks of space so they can move around will allow you to see the effect more quickly.
6) You should now be able to notice your hunger bar depleting even though you are in full health and standing there immobile without performing any actions.