Use cases

Mining

Have a Minecraft bot dig straight down on its own: it looks at its feet, holds left click and drops into each block it breaks, until a stop condition calls it off.

Mining with a bot means holding left click on blocks with a pickaxe, and down is the one direction a bot can keep going by itself. Looking at its feet, it breaks the block it stands on, drops onto the next and carries on, so it digs a shaft with nobody walking it. Every bot digs under its own feet, so a group standing side by side, one to a block, digs out an area as wide as the group. The macro below starts digging when the bot arrives in a world, and stop conditions call it off before it reaches lava or wears out its pickaxe.

What you need

  • Tier 3 for the held click and the stop conditions. The World change event itself is on every plan.
  • A Java or Bedrock account.
  • Physics on. Physics is what drops the bot into each hole, and the held click runs on it too, so with physics off nothing happens. See What are bot physics?
  • The bot standing where the shaft should start, on ground the server lets it break. Spawn and land someone else has claimed are usually protected.
  • A pickaxe in one of the nine hotbar slots, and food in its inventory for auto eat.

Build the macro

  1. Visit minecraftafk.com/dashboard/servers/, open the server profile, and open its Macros page.
  2. Click Create macro, click the event card, and pick World change under Runs when. It runs when the server moves the bot into a world, such as from the lobby into survival. On a server with no lobby, pick Join instead.
  3. Click Add step and pick Hold item. Under Item source pick Specific item, then the pickaxe under Item name.
  4. Add Look and click Down on the compass, or type 90 under Up/Down.
  5. Add Hold left click and untick Hit entities, so the bot never swings at a mob that walks past. Under Step name you can call it Mine down.
  6. Add Enable auto eat.
  7. Add the stop conditions below, then click Create macro at the top right.

The button stays down when the run ends, so the bot keeps digging until something lets it go. Each block takes its full mining time, as it would for a player with that pickaxe.

Keep it safe

Click Add stop condition on the dashed frame round the flow for each of these. Release when the macro stops is ticked on Hold left click to begin with, so whichever one fires, the bot lets go of the button.

  • Block in range, with Block set to Lava and Within (blocks) at 3: it stops once lava is within 3 blocks, before the bot digs into it. On 1.8 the list has Lava and Stationary Lava, so add one for each.
  • Tool durability, with Item in on Main hand and Down to (uses left) at 20: it stops before the pickaxe breaks. A pickaxe going through stone uses a few more in the moment the stop takes, so leave a margin.
  • Damaged, with End with panic logout action ticked: a fall into a cave or a mob's hit takes the bot off the server.

Each one keeps the macro stopped on that account until you start it again from the Macros page, so there is time to move the bot away from whatever stopped it. See Starting again after a stop.

To let go by hand, untick the account under Hold left click on the Clicking tab. A macro's hold shows there too, and it is saved on the account, so it comes back after a reconnect.

Good to know

  • A click reaches 4.5 blocks, a survival player's reach. Looking down, that only ever covers the block under its feet, and falling brings the next one into reach. Aimed straight ahead, the bot breaks the blocks in front of it as far as it can reach and then has nothing left in reach, since nothing walks it forward.
  • The shaft is one way. Walk to never breaks or places a block, so it can't climb out of a hole one block wide. A Chat step with a command such as /home brings the bot back up, on a server that has one.
  • World change also runs when the server sends the bot back to the lobby. To dig in one world only, put the steps inside an If on In a world.
  • At the bottom of the world the bot reaches bedrock, which can't be broken, and stays there holding the button until something stops the macro.
  • The button pauses while a chest or menu is open on the bot, and carries on once it closes. With auto eat on, the bot finishes the block it is breaking, lets go to eat, and presses again after.
  • A server that allows AFK can still act on an account that does nothing else: see Can I get banned for only AFKing?

The macros guide's Holding a button and Event settings, which covers Block in range and Tool durability, and Stop conditions are worth reading next.