melzneni

Craft

Sep 13th, 2023 (edited)
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. #import:iT4NKZfx;
  2.  
  3. main:{
  4.  
  5. print("turtle should be facing source chest");
  6. slots = [];
  7. input("press enter to read recipe");
  8. for(i=0;i<16;i++){
  9. if (getItemCount(i)==0){continue;};
  10. slots.add(i);
  11. };
  12. amount = tonumber(input("amount/cycle"));
  13. direction = getDirection();
  14. while (true) {
  15. #{
  16. setDirection(direction);
  17. for(i=0;i<slots.length;i++) {
  18. suck(slots[i],amount);
  19. };
  20. };
  21. craft();
  22. left();
  23. left();
  24. #{
  25. setDirection((direction + 2) % 4);
  26. for(i=0;i<16;i++){
  27. if (getItemCount(i)==0){continue;};
  28. drop(i, 64);
  29. };
  30. };
  31. left();
  32. left();
  33. }
  34.  
  35. }
Add Comment
Please, Sign In to add comment