Advertisement
CaptainSpaceCat

Untitled

Apr 11th, 2015
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. function craft_planks()
  2. slot = 1
  3.  
  4. for i = 1, 16, 1 do
  5. turtle.select(i)
  6. item = turtle.getItemDetail()
  7. if item then
  8. if item.name ~= "minecraft:log" then
  9. turtle.drop()
  10. else
  11. turtle.transferTo(slot)
  12. slot = slot + 1
  13. end
  14. end
  15. end
  16. for i = 2, 16, 1 do
  17. turtle.select(i)
  18. turtle.drop()
  19. end
  20. turtle.craft()
  21. turtle.suck()
  22. end
  23.  
  24. function craft_chest()
  25. craft_planks()
  26. slot = 1
  27.  
  28. for i = 1, 16, 1 do
  29. turtle.select(i)
  30. item = turtle.getItemDetail()
  31. if item then
  32. if item.name ~= "minecraft:plank" then
  33. turtle.drop()
  34. else
  35. if item.count > 7
  36. turtle.select(1)
  37. turtle.transferTo(1, 1)
  38. turtle.transferTo(2, 1)
  39. turtle.transferTo(3, 1)
  40. turtle.transferTo(5, 1)
  41. turtle.transferTo(7, 1)
  42. turtle.transferTo(9, 1)
  43. turtle.transferTo(10, 1)
  44. turtle.transferTo(11, 1)
  45. turtle.select(16)
  46. turtle.craft(1)
  47. turtle.suck()
  48. end
  49. end
  50. end
  51. end
  52. if item.count > 7
  53. turtle.select(1)
  54. turtle.transferTo(1, 1)
  55. turtle.transferTo(2, 1)
  56. turtle.transferTo(3, 1)
  57. turtle.transferTo(5, 1)
  58. turtle.transferTo(7, 1)
  59. turtle.transferTo(9, 1)
  60. turtle.transferTo(10, 1)
  61. turtle.transferTo(11, 1)
  62. turtle.select(16)
  63. turtle.craft(1)
  64. turtle.suck()
  65. end
  66. end
  67.  
  68. craft_planks()
  69. craft_chest()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement