This commit is contained in:
Julian Brammer 2024-06-23 19:25:26 +02:00
parent 5cc1bb9a44
commit d62226bafb
2 changed files with 11 additions and 1 deletions

View File

@ -123,7 +123,8 @@ end
local function goToPosition(toR, toX, toY, toZ) end
local function goToPosition(toR, toX, toY, toZ)
print("t1")
-- go to lastValidY
while pos["y"] < toY do
secureDigUp()
@ -166,6 +167,11 @@ local function goToPosition(toR, toX, toY, toZ) end
forward()
end
--rotate in right direction
while not pos["r"] == toR do
right()
end
end

View File

@ -325,9 +325,12 @@ if fs.exists "brulijam/files/state-t-fiboMiner.txt" then
checkPosition()
mineFibo()
else
print("c1")
state = getState()
print("c2")
local pos = tutel.getPos()
print("c3")
state["lastValidR"] = pos["r"]
state["lastValidX"] = pos["x"]
@ -335,5 +338,6 @@ else
state["lastValidZ"] = pos["z"]
setState(state)
print("c4")
end