This commit is contained in:
Dominic Zimmer 2020-07-06 19:15:21 +02:00
parent 99a2cdb6e1
commit 86aa002444

View File

@ -511,13 +511,12 @@ function goToCoordXZ(targetX, targetZ, extraaction)
extraaction() extraaction()
end end
end end
if targetZ > z then if targetZ > z then
faceDir(1) faceDir(1)
while (targetZ > z) do while (targetZ > z) do
moveSafe(turtle.forward, turtle.inspect, turtle.dig) moveSafe(turtle.forward, turtle.inspect, turtle.dig)
z = z + 1 z = z + 1
eztraaction() extraaction()
end end
end end
if targetZ < z then if targetZ < z then
@ -525,7 +524,7 @@ function goToCoordXZ(targetX, targetZ, extraaction)
while (targetZ < z) do while (targetZ < z) do
moveSafe(turtle.forward, turtle.inspect, turtle.dig) moveSafe(turtle.forward, turtle.inspect, turtle.dig)
z = z - 1 z = z - 1
eztraaction() extraaction()
end end
end end
end end
@ -561,11 +560,7 @@ function turtleAI2()
end end
-- turtleAI() -- turtleAI()
faceDir(0)
faceDir(1)
faceDir(3) faceDir(3)
faceDir(1) goToCoordXZ(4, 2, noop)
faceDir(0) goToCoordXZ(0, 0, noop)
faceDir(2)
faceDir(0)
goToCoordXZ(4, 2, noop) goToCoordXZ(4, 2, noop)