Hey, Yes you are allowed to AFK farm as long as it is a machine doing it for you instead of using something like macros, auto clickers, or any sort of hacks that give you an advantage over other players.
You can also use tape / a heavy object to hold down your mouse button so you keep breaking items - useful in sugar cane farms, etc. -===- Question Answered, Thread Locked -===-