BrineUtil

Untitled

Feb 22nd, 2021
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. function getFuelSlot()
  2. return 3
  3. end
  4. function getDumpSlot()
  5. return 4
  6. end
  7.  
  8. function refuel()
  9. -- get refuel slot
  10. local slot = getFuelSlot()
  11.  
  12. -- dump all junk
  13. dump()
  14.  
  15. -- refuel one stack
  16. turtle.select(slot)
  17. turtle.placeUp()
  18. turtle.select(16)
  19. turtle.suckUp()
  20. turtle.refuel()
  21. turtle.select(slot)
  22. turtle.digUp()
  23.  
  24. -- dump leftover fuel
  25. dump()
  26. end
  27.  
  28. function dump()
  29. -- get dump slot
  30. local slot = getDumpSlot()
  31.  
  32. -- empty all slots after dump slot into chest
  33. turtle.select(slot)
  34. turtle.placeUp()
  35. for i=slot+1,16 do
  36. turtle.select(i)
  37. turtle.dropUp()
  38. end
  39.  
  40. -- put chest back in dump slot
  41. turtle.select(slot)
  42. turtle.digUp()
  43. end
Add Comment
Please, Sign In to add comment