Advertisement
stelthbuny

Sorter

Jul 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. trashItems = {"minecraft:bow", "minecraft:leather_chestplate", "minecraft:leather_leggings", "minecraft:leather_boots", "minecraft:leather_helmet", "minecraft:chainmail_helmet", "minecraft:chainmail_chestplate", "minecraft:chainmail_leggings", "minecraft:chainmail_boots", "minecraft:iron_helmet", "minecraft:iron_chestplate", "minecraft:iron_leggings", "minecraft:iron_boots", "minecraft:golden_helmet", "minecraft:golden_chestplate", "minecraft:golden_leggings", "minecraft:golden_boots", "minecraft:iron_shovel", "minecraft:glass_bottle", "witchery:witchhand", "minecraft:potato", "minecraft:carrot"}
  2.  
  3. function trashItem()
  4. turtle.turnRight()
  5. turtle.drop()
  6. turtle.turnLeft()
  7. end
  8.  
  9. function storeItem()
  10. turtle.turnLeft()
  11. turtle.drop()
  12. turtle.turnRight()
  13. end
  14.  
  15. while true do
  16. for i=1,16,1 do
  17.  
  18. turtle.select(i)
  19. data = turtle.getItemDetail()
  20.  
  21. local trashed = false
  22. for i,item in pairs(trashItems) do
  23.  
  24. if data and data.name == item then
  25. trashed = true
  26. trashItem()
  27. break
  28. end
  29.  
  30. end
  31.  
  32. if not trashed then
  33. storeItem()
  34. end
  35.  
  36. end
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement