Advertisement
Axow01

Turtle exploring

Jun 29th, 2021 (edited)
419
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. require('func')
  2.  
  3. local blockDown = turtle.detectDown()
  4. local blockFront = turtle.detect()
  5. local count = 16
  6. for count = 1, 1 do
  7.     print('Entering the while')
  8.     blockDown = turtle.detectDown()
  9.     blockFront = turtle.detect()
  10.     if (blockDown == true) then
  11.         if (blockFront == false) then
  12.             turtle.forward()
  13.         else
  14.             turtle.up()
  15.             turtle.forward()
  16.         end
  17.     elseif (blockDown == false) then
  18.         local inspectBlock, data = turtle.inspectDown()
  19.         if (data.name == 'minecraft:water' or data.name == 'minecraft:lava') then
  20.             escape(10, true)
  21.         end
  22.         turtle.down()
  23.     end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement