Advertisement
kirik125

toHell

Apr 1st, 2023 (edited)
786
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.92 KB | None | 0 0
  1. function find(item, count)
  2.     count = count or 1
  3.     i =0
  4.     while i ~= 16 do
  5.         i = i+1
  6.         turtle.select(i)
  7.         local data = turtle.getItemDetail()
  8.         if data then
  9.             if(data.name == item and data.count >= count) then
  10.                 return true
  11.             end
  12.           end
  13.     end
  14.     return false;
  15. end
  16.  
  17.  
  18. leftBlocks = 0
  19. while true do
  20.     local success, data = turtle.inspect()
  21.     if success then
  22.         turtle.dig()
  23.         turtle.digDown()
  24.         if leftBlocks % 10 == 0 then
  25.             if find("minecraft:torch") then
  26.                 turtle.placeDown()
  27.             end
  28.             if find("minecraft:cobblestone",64) then
  29.                 turtle.drop()
  30.             end
  31.         end
  32.     end
  33.     if turtle.getFuelLevel() < 2 then
  34.         find("minecraft:coal_block")
  35.         turtle.refuel()
  36.     end
  37.  
  38.  
  39.  
  40.     turtle.forward()
  41.     leftBlocks = leftBlocks +1
  42.  
  43.  
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement