Advertisement
natie3

ItemSorter

Oct 29th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. function void()
  2.   turtle.turnLeft()
  3.   turtle.turnLeft()
  4.   turtle.drop()
  5.   turtle.turnRight()
  6.   turtle.turnRight()
  7. end
  8.  
  9. function keep()
  10.   turtle.drop()
  11. end
  12.  
  13. while true do
  14.   turtle.suckUp()
  15.   detail = turtle.getItemDetail()
  16.   if detail ~= nil then
  17.     if detail.name == "minecraft:bow" then
  18.       if detail.damage < 60 then
  19.         keep()
  20.       else
  21.         void()
  22.       end
  23.     else
  24.       keep()
  25.     end
  26.   end
  27.   os.sleep(0.5)
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement