Advertisement
Spirit13300

Untitled

May 20th, 2017
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. function iron ()
  2. turtle.down()
  3. turtle.down()
  4. turtle.down()
  5. turtle.drop()
  6. turtle.up()
  7. turtle.up()
  8. turtle.up()
  9. end
  10.  
  11. function gold ()
  12. turtle.down()
  13. turtle.down()
  14. turtle.down()
  15. turtle.down()
  16. turtle.drop()
  17. turtle.up()
  18. turtle.up()
  19. turtle.up()
  20. turtle.up()
  21. end
  22.  
  23. while true do
  24. data = turtle.getItemDetail()
  25. print(data.name)
  26. sleep(1)
  27.  
  28.     if (data.name=="minecraft:gold_ingot") then
  29.     gold()
  30. end
  31. if (data.name=="minecraft:iron_ingot") then
  32.     iron()
  33. end
  34. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement