Afk fishing, mob grinding and etc have until recently (as far as I am aware), have only been possible when the game is loaded in the foreground of your computer, preventing you from doing anything else. Personally, I find that a pain in the ass.
In the past, there have been glitches which could be used to work around this but I am unaware of any now.
So I set out to find a better way.
How to setup a minecraft autoclicker for use in the background.
This is for reasonably advanced users only - I am not going to go into full detail here.
Disclaimer (This is very important)
Please resist the temptation to try this if you don't know what you're doing - I don't want you to lose all your stuff.
If you are not familiar with the terms mentioned bellow, you're more likely to break your computer than get this right within in your first 3 attempts.
By this I mean, you will probably lose all your data stored on your computer and it won't boot. No more Microsoft Windows, no more documents, no more emails, etc.
I welcome users who do attempt this, to take this idea and make it easier for less experienced people to follow.
If you have any questions, please DM me.
This article was written on 18/August/2020. If you are here years later after this date, take the following with a helping of salt, so to speak.
Let's get into it
With all that out of the way, you've probably already guessed this is achieved through a virtual machine, and you're right, but don't go just yet - after many, many, many... hours of trial and error, I have found this is astoundingly difficult in practice, so please read my tutorial. Don't worry - it won't be long.
So far, I have tested several VM softwares - the following do not work at all*:
(*Out of the box, without some extreme hardware and software modifications, that I did not have the skills and money to bother investing my time in. Your results may vary)
VirtualBox, Hyper-V and QEMU
QEMU may be possible to use, but the fact that it is an Emulator allegedly makes it painfully slow, inefficient and I wasn't bothered to learn the commands to use it anyway.
Hyper-V and VirtualBox don't have 3D graphics acceleration compatability, by default and it was not fruitful installing additions to them.
(but I would love if someone could figure out how to do this in hyper-V, that would be amazing.)
The only free software I have found that works suitably is "VMware Workstation 15 player" (god that's a mouthful).
It's available for free, for no commercial uses, although this isn't advertised on the VMware site.
Despite the name trial, it has no significant limitations, compared to the commercial version (at least for our purposes).
Firstly, create a machine and install windows 10. After that, make sure to install VM-Ware tools.
Install Java and Minecraft (java edition - duh) on it.
The rest is fairly self explanatory, just skip to the bit at the end if you like.
From here on, I'll just record what I did.
My choice of auto-clicker
At this point, you can go your own way.
Here, I chose to download AutoHotkey and use that to run my custom auto-clicker. I threw a script together for it.
I install it and run my script. With the game open, I press Ctrl+l, it beeps at you and now you will left click every 2 seconds. Every so often, it will go to the last inventory slot and hold down right click for a bit(to eat food), and then go back to the first.
Press Ctrl+Esc to stop it (There will be another nice beep).
The bit at the end
With your auto-clicker of choice hacking away at things in the game, press Ctrl+Alt and then Alt+Tab. You now have mine-craft running in the background. Well done if it worked. I'm terribly sorry if it didn't.
Please help me (Read this if it didn't work)
If you have any problems, please message me and we can troubleshoot it together.
In theory (I strongly stress this may not work in practice), you can have as many VMs running at once as your computer can handle. However, this will require several Minecraft java accounts and some real perseverance to try and get working. My goal is to turn this crude method into an easy and more beginner-friendly way to make AFK farms much better to use.
This is misinformation. Virtualbox has a working opengl-compatibile driver (it even runs Minecraft under linux, even if slowly, but for a afk it's okay - I do not know if it runs Minecraft on windows, but on windows external graphics driver are nedeed nonetheless).
Under linux you need a simple software which clicks in the minecraft window. No vm, no nothing. For instance, for a 1.15.2-style fishing farm, which works by keeping the right mouse button pressed, you don't even need the software running: it only needs to be run once to change the status of the button to pressed once, since Minecraft do not receive any “mouse button get depressed” event, it simlpy let the farm work.