Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- currentX = 0
- currentY = 0
- function moveToCoordinates(targetX, targetY)
- --local currentX, currentY = getPosition() -- You'll need to implement this function
- local safeY = 3 -- Choose a safe height that is above all chests
- -- Move up to a safe height first
- if currentX ~= 0 then
- turtle.back()
- end
- while currentY < safeY do
- turtle.up()
- currentY = currentY + 1
- end
- -- Move to the correct X coordinate
- while currentX < targetX do
- turtle.forward()
- currentX = currentX + 1
- end
- while currentX > targetX do
- turtle.back()
- currentX = currentX - 1
- end
- -- Move down to the target Y coordinate
- while currentY > targetY do
- turtle.down()
- currentY = currentY - 1
- end
- while currentY < targetY do
- turtle.down()
- currentY = currentY + 1
- end
- end
- --moveToCoordinates(2, , targetZ)
Advertisement
Comments
-
- ah yes interesting interesting, i'm building a goiant cc smeltery and fluid handler rn
Add Comment
Please, Sign In to add comment
Advertisement