Advertisement
minimite

fw

Jan 5th, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.27 KB | None | 0 0
  1. local oldf = turtle.forward
  2. function turtle.forward(...)
  3.     local tArgs = {...}
  4.     local x, y = oldf(tArgs)
  5.     if not x and not turtle.detect() then
  6.         repeat
  7.             turtle.attack()
  8.             x, y = oldf(tArgs)
  9.         until x
  10.     end
  11.     return x, y
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement