Advertisement
Ragdoll96

qarry drop

Sep 25th, 2022
757
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. local blocks = {"cobblestone","dirt","cobbled_deepslate"}
  2. local data = turtle.getItemDetail()
  3. while true do
  4.     local event = os.pullEvent(turtle_inventory)
  5.     os.sleep(20)
  6.     for i = 1, 16 do
  7.         if turtle.getItemCount(i) > 0 then
  8.             turtle.select(i)
  9.             data = turtle.getItemDetail()
  10.             for i = 1,#blocks do
  11.                 if (string.sub(data.name,11)) == blocks[i] then
  12.                     turtle.drop()
  13.                     break
  14.                 end
  15.             end
  16.         end
  17.         if turtle.getItemCount(i) > 0 then
  18.             turtle.dropDown()
  19.         end
  20.     end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement