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