-2

I'm completely new to Minecraft automation and need help from scratch.

Task: Excavate a 25×25×25 block area in Minecraft.

What I have:

  • Minecraft 1.8

  • AutoHotkey

  • Python OpenCV

  • Anything you can offer

What I don't know:

  1. Where to start mining from (corner, center, edge)

  2. Which movement algorithm is most efficient (snake, spiral, other)

  3. How to detect dead ends and properly turn around

  4. How to handle layer transitions

I've tried various scripts but the bot either spins in place or mines in the wrong direction.

Here is one of my attempts that didn't work properly:

#SingleInstance Force

SmartMine := false
LastMoveTime := 0

MineTime := 3000
StuckCheckTime := 5000

F3::
    SmartMine := !SmartMine
    if (SmartMine) {
        ToolTip, SIMPLE MINE - Started, 10, 10
        LastMoveTime := A_TickCount
        Send, {MButton down}
        Send, {LButton down}
        Send, {RButton down}
        SetTimer, CheckIfStuck, 1000
    } else {
        StopMining()
    }
return

F4::
    StopMining()
    ExitApp
return

CheckIfStuck:
    if (!SmartMine)
        return
    if (A_TickCount - LastMoveTime > StuckCheckTime) {
        ToolTip, SIMPLE MINE - STUCK! Turning around, 10, 10
        MakeUTurn()
        LastMoveTime := A_TickCount
    }
return

MakeUTurn() {
    MouseMove, 1800, 0, 20, R
    Send, {LButton down}
    Send, {RButton down}
    ToolTip, SIMPLE MINE - Continuing, 10, 10
}

StopMining() {
    global SmartMine
    SmartMine := false
    ToolTip
    Send, {LButton up}
    Send, {RButton up}
    Send, {MButton up}
    SetTimer, CheckIfStuck, Off
}

I'm ready to follow any logic, just need it to work!

Would appreciate help with:

  • Explaining the optimal algorithm

  • Code assistance (AHK, Python, NodeJS)

  • Timing configuration tips

  • Best practices for Minecraft automation

Thank you in advance for any guidance!

New contributor
funerary trap is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1
  • 4
    This post is far too broad in scope. Please edit and limit it to one narrowly scoped question and then add details regarding that one question (what research you've done, what you found in that research and how it didn't resolve your problem, etc). You posted code, but haven't given specific debugging details that explain exactly where in your code you aren't getting the result you expect. So please also add specific debugging details that pertain to your one question. Also, add a tag for the programming language you're using. Commented 18 hours ago

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.