Mob grinding
Mob grinding is parking a bot at the kill spot of a mob farm or grinder and leaving it there to kill whatever the farm brings, so the drops and the experience keep coming while you're away. One macro does it: each time a mob comes within reach, the bot turns to it and holds left click, and the button stays down between mobs.
What you need
- Tier 3. The Mob appears event and the Hold left click step both need it.
- A Java or Bedrock account. A macro holds the button on both.
- Physics on. The held click runs on the bot's physics, so with physics off it does nothing. Physics is on unless you turned it off in the profile's dangerous settings.
- The bot parked at the kill spot, within 3 blocks of where the mobs end up. It turns to them but never walks, and 3 blocks is as far as a survival player reaches to hit a mob.
- A weapon in one of the nine hotbar slots, since the hotbar is where the bot switches from, and food anywhere in its inventory for auto eat.
Build the macro
- Visit minecraftafk.com/dashboard/servers/, open the server profile, and open its Macros page.
- Click Create macro, click the event card, and pick Mob appears under Runs when.
- Under Mobs, type the mob your farm makes, such as
zombieorblaze, and press Enter, or leave it empty for any mob. Set Only within (blocks) to how far from the bot the mobs end up, 3 or 4. Leave Also fire if one is already nearby ticked, so a farm that is already full starts it the moment the bot joins. - Click Add step and pick Hold item. Under Item source pick Specific item, then the weapon under Item name.
- Add Look at entity, pick Any mob under Match, and set Within (blocks) to the same distance.
- Add Hold left click and untick Break blocks. The bot then only ever hits mobs, and can't start mining the farm once the mob it was hitting dies. Under Step name you can call it Kill mobs.
- Add Enable auto eat.
- Click Create macro at the top right.
Every mob that comes within range runs the macro again, and the bot turns to the nearest one. Between runs the button stays down, so a mob that walks into the crosshair is hit without the macro running at all. In a busy farm, set Don't run again for on the event to a few seconds, and the bot turns less often.
Keep it safe
Release when the macro stops is ticked on Hold left click to begin with, so whenever the macro is stopped, the bot lets go of the button. The stop conditions below are what stop it, and they need Tier 3 too. Click Add stop condition on the dashed frame round the flow for each:
- Player appears, with End with panic logout action ticked: when someone walks up, the bot lets go and leaves the server. Put your friends under Never fire for these players; your own accounts are left out already. Tick Allow macro to start again and the bot comes back by itself, 10 minutes later to begin with.
- Death: a bot that dies respawns somewhere else, still holding the button. This stands it down instead.
- Tool durability, with Item in on Main hand and Down to (uses left) at 10: it stops before the weapon breaks.
Leave Auto reconnect delay switched on in the profile's settings (it is on for a new profile), so the bot rejoins after a kick or a server restart. The held button comes back with it, because a macro's hold is saved on the account like one from the Clicking tab. It shows there too: the account is ticked under Hold left click, and unticking it lets go.
Good to know
- On Java 1.9 and newer, the bot waits for its weapon to recharge before each hit, the way a player landing full-strength hits does, so the weapon sets the pace: a sword hits about every 0.6 seconds and an axe about once a second. On older versions, which have no recharge, and on Bedrock accounts, it hits about once a second whatever it holds.
- The button pauses while a chest or menu is open on the bot, and carries on once it closes. With auto eat on, it also lets go while the bot eats, and presses again after.
- On HugoSMP, where a spawner opens a menu with a collect button, the library's spawner macros collect its drops and sell them instead: see Official macros.
- A server that allows AFK can still act on an account that does nothing but farm: see Can I get banned for only AFKing?
The macros guide's Holding a button and Release when the macro stops, and Stop conditions, are worth reading next.
How do I get support?
Get help with MinecraftAFK in our Discord server, by email at contact@valoks.com, or in a live chat our support team opens with you in the dashboard.
Auto sell
Sell what your Minecraft bots collect while you're away, with the official Sell axe and Sell menu macros for DonutSMP and HugoSMP, or a sell loop you build yourself.