Drakaxx

FarmWool

Oct 28th, 2020 (edited)
518
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. function dropIfFull()
  2. for i=1,16 do
  3. turtle.select(i)
  4. local itemDetail = turtle.getItemDetail()
  5. if itemDetail then
  6. if itemDetail.name ~= 'minecraft:shears' then
  7. turtle.dropDown()
  8. end
  9. end
  10.  
  11. end
  12. end
  13.  
  14. function shear()
  15. local foundShear = false
  16. for i=1,16 do
  17. turtle.select(i)
  18. local itemDetail = turtle.getItemDetail()
  19. if itemDetail then
  20. if itemDetail.name == 'minecraft:shears' then
  21. turtle.place()
  22. foundShear = true
  23. break
  24. end
  25. end
  26. end
  27.  
  28. if foundShear == false then
  29. error()
  30. end
  31. end
  32.  
  33. while true do
  34. dropIfFull()
  35. shear()
  36. os.sleep(30)
  37. end
Advertisement
Add Comment
Please, Sign In to add comment