Is it possible to auto-walk while breaking blocks using a macro in Minecraft?

I would like to auto farm sugar canes on a server is this possible?


Yes, it is. Since you only want to farm sugarcane, you can just look straight forwards, orient yourself at the exact 90° angle using the F3 debug screen and then instruct your macro program to walk forwards and hold your mining button. Maybe you also want to walk a bit slower than possible so that you can collect all the items.

Some people consider it cheating to use a macro. You can also automatically farm sugarcane without a macro. Just put a piston on the side of the second sugarcane block, pointing towards it, put a slow clock on that piston and a hopper where the item lands.