.
This commit is contained in:
parent
908a33431b
commit
c461befe64
@ -121,9 +121,11 @@ local function inventoryRework()
|
||||
if not spaceAvailable and chestAvailable then
|
||||
--turtle.up()
|
||||
state["y"] = tutel.up(state["y"])
|
||||
setState(state)
|
||||
basic.secureDigUp()
|
||||
--turtle.up()
|
||||
state["y"] = tutel.up(state["y"])
|
||||
setState(state)
|
||||
basic.secureDigUp()
|
||||
turtle.select(chestSlot)
|
||||
turtle.placeUp()
|
||||
@ -140,8 +142,10 @@ local function inventoryRework()
|
||||
end
|
||||
--turtle.down()
|
||||
state["y"] = tutel.down(state["y"])
|
||||
setState(state)
|
||||
--turtle.down()
|
||||
state["y"] = tutel.down(state["y"])
|
||||
setState(state)
|
||||
end
|
||||
|
||||
if not spaceAvailable and not chestAvailable then
|
||||
@ -166,14 +170,17 @@ local function recursiveOreMining()
|
||||
for i=0, 3 do
|
||||
--turtle.turnLeft()
|
||||
state["r"] = tutel.left(state["r"])
|
||||
setState(state)
|
||||
blockFound, blockData = turtle.inspect()
|
||||
if isOre(blockData) then
|
||||
tutel.secureDig()
|
||||
--turtle.forward()
|
||||
state["x"], state["y"], state["z"], state["r"] = tutel.forward(state["x"],state["y"],state["z"],state["r"])
|
||||
setState(state)
|
||||
recursiveOreMining()
|
||||
--turtle.back()
|
||||
state["x"], state["y"], state["z"], state["r"] = tutel.bac(state["x"],state["y"],state["z"],state["r"])
|
||||
setState(state)
|
||||
end
|
||||
end
|
||||
|
||||
@ -181,10 +188,12 @@ local function recursiveOreMining()
|
||||
if isOre(blockData) then
|
||||
tutel.secureDigUp()
|
||||
--turtle.up()
|
||||
state["y"] = tutel.up(state["y"])state["y"] = tutel.forward(state["y"])
|
||||
state["y"] = tutel.up(state["y"])
|
||||
setState(state)
|
||||
recursiveOreMining()
|
||||
--turtle.down()
|
||||
state["y"] = tutel.down(state["y"])
|
||||
setState(state)
|
||||
end
|
||||
|
||||
blockFound, blockData = turtle.inspectDown()
|
||||
@ -192,9 +201,11 @@ local function recursiveOreMining()
|
||||
tutel.secureDigDown()
|
||||
--turtle.down()
|
||||
state["y"] = tutel.down(state["y"])
|
||||
setState(state)
|
||||
recursiveOreMining()
|
||||
--turtle.up()
|
||||
state["y"] = tutel.up(state["y"])
|
||||
setState(state)
|
||||
end
|
||||
end
|
||||
|
||||
@ -206,6 +217,7 @@ local function mineRow()
|
||||
tutel.secureDig()
|
||||
--turtle.forward()
|
||||
state["x"], state["y"], state["z"], state["r"] = tutel.forward(state["x"],state["y"],state["z"],state["r"])
|
||||
setState(state)
|
||||
tutel.secureDigUp()
|
||||
tutel.secureDigDown()
|
||||
|
||||
@ -215,15 +227,19 @@ local function mineRow()
|
||||
--check current mining step for ore
|
||||
--turtle.up()
|
||||
state["y"] = tutel.up(state["y"])
|
||||
setState(state)
|
||||
recursiveOreMining()
|
||||
--turtle.down()
|
||||
state["y"] = tutel.down(state["y"])
|
||||
setState(state)
|
||||
recursiveOreMining()
|
||||
--turtle.down()
|
||||
state["y"] = tutel.down(state["y"])
|
||||
setState(state)
|
||||
recursiveOreMining()
|
||||
--turtle.up()
|
||||
state["y"] = tutel.up(state["y"])
|
||||
setState(state)
|
||||
|
||||
inventoryRework()
|
||||
--clearInventory()
|
||||
@ -251,26 +267,32 @@ local function mineChunk()
|
||||
if i<state["dataGoalRows"]-1 then
|
||||
--turtle.turnLeft()
|
||||
state["r"] = tutel.left(state["r"])
|
||||
setState(state)
|
||||
--turtle.turnLeft()
|
||||
state["r"] = tutel.left(state["r"])
|
||||
setState(state)
|
||||
|
||||
for j=1, state["dataGoalPathProgress"]-1 do
|
||||
--turtle.forward()
|
||||
state["x"], state["y"], state["z"], state["r"] = tutel.forward(state["x"],state["y"],state["z"],state["r"])
|
||||
setState(state)
|
||||
end
|
||||
|
||||
--go to next row
|
||||
--turtle.turnLeft()
|
||||
state["r"] = tutel.left(state["r"])
|
||||
setState(state)
|
||||
for j=0, 2 do
|
||||
tutel.secureDig()
|
||||
--turtle.forward()
|
||||
state["x"], state["y"], state["z"], state["r"] = tutel.forward(state["x"],state["y"],state["z"],state["r"])
|
||||
setState(state)
|
||||
tutel.secureDigUp()
|
||||
tutel.secureDigDown()
|
||||
end
|
||||
--turtle.turnLeft()
|
||||
state["r"] = tutel.left(state["r"])
|
||||
setState(state)
|
||||
end
|
||||
|
||||
state["dataCurrentRow"] = i+1
|
||||
@ -290,10 +312,12 @@ local function mineFibo()
|
||||
--go to next chunk
|
||||
--turtle.turnRight()
|
||||
state["r"] = tutel.right(state["r"])
|
||||
setState(state)
|
||||
for j=1, 2 do
|
||||
tutel.secureDig()
|
||||
--turtle.forward()
|
||||
state["x"], state["y"], state["z"], state["r"] = tutel.forward(state["x"],state["y"],state["z"],state["r"])
|
||||
setState(state)
|
||||
tutel.secureDigUp()
|
||||
tutel.secureDigDown()
|
||||
end
|
||||
@ -327,5 +351,6 @@ else
|
||||
state["startX"] = startX
|
||||
state["startY"] = startY
|
||||
state["startZ"] = startZ
|
||||
setState(state)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user