thatparadox

Inspector

Sep 27th, 2014
192
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Video of it in action: https://www.youtube.com/watch?v=kTzkTcCTVZg&list=PL9XabkF_A5YhxWelwj2yzjcegL9E0WLw6
  2.  
  3. while true do
  4.   p1, p2 = turtle.inspect() --gets the data from the block
  5.   if p1 == true then --check if there is a block in front of the turtle
  6.     for k,v in pairs(p2) do --reads the table
  7.       if v == "minecraft:stone" then --checks if the block is stone
  8.         turtle.dig() --makes turtle dig
  9.       end  
  10.     end
  11.   end  
  12. end
RAW Paste Data