mojira.dev
MC-43601

Hunger is lost when standing in close proximity to mobs / stat.walkOneCm increases

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.

Linked issues

Attachments

Comments 17

Please force a crash by pressing F3 + C for 10 seconds while in-game and attach the crash report ([minecraft/crash-reports/crash-<DATE>-client.txt|http://hopper.minecraft.net/help/finding-minecraft-data-folder]) here.

I've now attached a copy of the forced crash report.

Cannot confirm.
Built a setup with ~20 villagers and ~20 cows, jumped inside the cages with two food bars missing but the food bar drained not after standing there for 10 minutes, see screenshots.

Included are a couple of screenshots of the setup I had been using, where I had been on the far side of the bars from the cows. Had you eaten just prior to running the test? I duplicated your setup and numbers of cows, and it seemed to take about 10 minutes before the saturation from eating a single steak was depleted. Once the saturation was gone, with the ~20 cows, it took ~55 seconds to deplete 1 point of hunger. When I increased the number of cows in your setup to ~80, it took ~30 seconds to deplete 1 point of hunger.

Is this still a concern in the current Minecraft version 14w10c / Launcher version 1.3.11 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

7 more comments

Posted a video of stat.walkOneCm going up. Hunger was depleting a bit, though the video doesn't show much hunger lowering.

Can confirm for minecraft snapshot (1.9) 15w32c.
Stanting near a mob (only tested with NoAI mobs) still increase the score stat.walkOneCm

Marking as fixed since players get pushed back now. If the stat increase also wrongly affects mobs, please create a new ticket.

This bug is happening for me on 11.1.2, while standing still in my AFK gold farm (the Doughnut design by SnoCrash).

Can you record a video of this happening to you?

Varilence

(Unassigned)

Confirmed

hunger, mob

Minecraft 1.6.4, Minecraft 1.7.1, Minecraft 1.7.2, Minecraft 13w48a, Minecraft 13w48b, ..., Minecraft 14w29b, Minecraft 1.8, Minecraft 1.8.6, Minecraft 1.8.7, Minecraft 15w32c

Minecraft 15w36b

Retrieved