diff --git a/mineleader.lua b/mineleader.lua index e1d9258..19aff31 100644 --- a/mineleader.lua +++ b/mineleader.lua @@ -436,13 +436,7 @@ local function quarry(x, y, z, relative, pattern) z = tonumber(z) local forward; local right; - if relative then - forward = relHeading - right = relRightAxis - else - forward = heading - right = rightAxis - end + sendLog(QUARRY, "Starting quarry of (x length,depth,z length): " .. x .. "," .. y .. "," .. z .. " with a not pattern of: " .. pattern) for yDelta=1,math.abs(y) do if (y > 0) then @@ -475,6 +469,13 @@ local function quarry(x, y, z, relative, pattern) else orient(vector.new(0, 0, z), forward, right) end + if relative then + forward = relHeading + right = relRightAxis + else + forward = heading + right = rightAxis + end success = success and attemptBreakUp(pattern) success = success and attemptBreakDown(pattern) success = success and attemptBreakFront(pattern) @@ -492,6 +493,13 @@ local function quarry(x, y, z, relative, pattern) sendLog(FAILED, "Unable to move to next row.") return end + if relative then + forward = relHeading + right = relRightAxis + else + forward = heading + right = rightAxis + end end end end