fix: crash the miner when cannot dig down
This commit is contained in:
parent
7d6825f59d
commit
988bf73955
@ -145,7 +145,12 @@ local function mineProcedure()
|
||||
|
||||
-- 1. Move
|
||||
if robotState.y > targetY then
|
||||
turtle.digDown()
|
||||
local ok, err = turtle.digDown()
|
||||
|
||||
if not ok then
|
||||
error('Cannot dig down because ' .. err)
|
||||
end
|
||||
|
||||
miner.robot.down()
|
||||
elseif robotState.dir == 'FORWARD' and robotState.z < targetZ then
|
||||
turtleUtils.digAll()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user