4ndertheker

Untitled

Mar 27th, 2020
716
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local items = {
  2. "minecraft:cobble",
  3. "minecraft:cobblestone",
  4. "minecraft:dirt",
  5. "minecraft:gravel"
  6. }
  7.  
  8. local name
  9. local found
  10.  
  11. while true do
  12.   for i = 1, 16, 1 do
  13.  
  14.     if turtle.getItemCount(i) > 0 then
  15.       turtle.select(i)
  16.       name = turtle.getItemDetail().name
  17.       found = false
  18.       for j = 0, #items, 1 do
  19.         if name == items[j] then
  20.           turtle.drop()
  21.           found = true
  22.           break
  23.         end
  24.       end
  25.       if not found then
  26.         turtle.dropUp()
  27.       end
  28.     else
  29.       sleep(.2)
  30.     end
  31.  
  32.   end
  33. end
Advertisement
Add Comment
Please, Sign In to add comment