I'm considering starting a hardcore world but theres starving so I'm not sure how I'm supposed to AFK. Some youtubers I've watched claimed that they AFK in the world for days so I'm just wondering what are your methods of AFK without dying or any existing methods you know.
I've seen various claims to the contrary but this is likely because they weren't truly standing still (before 1.11, for example being pushed by a mob, including passive mobs, counts as moving) or a hostile mob somehow got to them, and I've verified this by adding a line to the code that prints out hunger loss (for 1.6.4 but any changes to hunger since then have only reduced the rate at which it is lost due to various activities).
There are relatively recent bug reports about starving to death while AFK (e.g. in 1.15 but not 1.14) but they were never confirmed, and there are likewise countless threads about starving when AFK with numerous replies that they can't confirm/never experienced it, so it is quite odd that it sometimes happens (such claims go all the way back then when hunger was added, e.g. this Wiki Talk page from 2011, which is correct about being in flowing water depleting hunger even if you don't seem to be moving).
I'm playing a current version Hardcore right now and I use very little food even when mining and walking around. I haven't tested whether I can just sit forever but I've played for hours and I wouldn't have depleted my original shanks yet. How long do you want to go AFK?
Rollback Post to RevisionRollBack
Geographicraft (formerly Climate Control) - Control climate, ocean, and land sizes; stop chunk walls; put modded biomes into Default worlds, and more!
My previous reply still stands - you were never, ever supposed to lose hunger just by standing still, barring various bugs, like mobs pushing you and the movement counting towards distance walked (and in turn, hunger loss, but walking no longer depletes hunger so this is no longer an issue, and even if it were, standing next to (not in) a pen/mob farm will end up with them pushing you until you are out of range since 1.9 re-added the ability for mobs to push players):
Having said that, I tried to reproduce this in vanilla 1.6.4, which is listed as being affected, and could not get "Distance Walked" to increase, e.g. standing in the way of multiple zombies attempting to reach a villager behind me (entities do collide with players in this version, just that before 1.9 the player was unmovable by most entities), or in and next to a pen full of cows (tested fences and iron bars). I did not check hunger/exhaustion but from the code there is no need to since it checks if the distance moved is at least 1 centimeter and if so adds the value to the stat and subtracts from exhaustion.
The inclusion of 1.6.4 in a report filed well after the release of 1.7 also seems suspicious, and the oldest related report is for a 1.7 snapshot, so they may have changed something, or it only occurs on a multiplayer server (a singleplayer server does have some differences from true multiplayer and many comments refer to multiplayer), and this report was actually resolved as works as intended: