Advertisement
ksaw000

checkFuel

Feb 3rd, 2021 (edited)
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. require("programs/globalVars")
  2.  
  3. if FUEL<=STEPS then
  4. shell.run("invDump "+ tostring(FIRST_FREE_SLOT)) --make sure invetory is empty to accept potential items
  5. turnAround()
  6. while (turtle.detect()) do --makes space for chests even if it has to dig mulitiple blocks
  7. turtle.dig()
  8. end
  9. turtle.select(1) -- select lava enderchest
  10. turtle.place()
  11. turtle.select(16) -- last slot specially for fuel
  12. turtle.suck() --get lava bucket
  13. turtle.refuel()
  14. turtle.select(1) -- lavachest slot
  15. turtle.dig()
  16. turtle.select(2) -- bucket chest slot
  17. turtle.place()
  18. turtle.select(16) --empty bucket
  19. turtle.drop() --puts bucket in enderchest
  20. turtle.select(2)
  21. turtle.dig()
  22. turnAround()
  23. FUEL = turtle.getFuelLevel()
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement