Advertisement
Guest User

mine

a guest
Mar 26th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.67 KB | None | 0 0
  1.  
  2.  
  3. function fuel()
  4.   if turtle.getFuelLevel() <= 60 then
  5.     turtle.select(16)
  6.     turtle.refuel()
  7.   end
  8. end
  9.  
  10. local depth = 0
  11.  
  12. function isValuable()
  13.   local n = {"minecraft:stone", "minecraft:dirt", "minecraft:gravel", "minecraft:cobble"}
  14.   local success, whatIt = turtle.inspect()
  15.   local whatIsThis = whatIt.name
  16.  
  17.  
  18.   for key,value in ipairs(n) do
  19.     if whatIsThis ~= value then
  20.       return true
  21.     else
  22.       return false  
  23.     end
  24.   end        
  25. end
  26.  
  27.  
  28. --[[
  29. turtle.digDown()
  30.  
  31. while turtle.detectDown() == false do
  32.   fuel()
  33.   turtle.down()
  34.   if isValuable() then
  35.  
  36.   turtle.digDown()
  37. end
  38. ]]--
  39.  
  40. if isValuable() then
  41.   turtle.dig()
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement