Advertisement
BigGamingGamers

Untitled

Nov 17th, 2020 (edited)
4,514
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 1 0
  1. local SLOT_COUNT = 16
  2.  
  3. function getItemIndex(itemName)
  4. for slot = 1, SLOT_COUNT, 1 do
  5. local item = turtle.getItemDetail(slot)
  6. if(item ~= nil) then
  7. if(item["name"] == itemName) then
  8. return slot
  9. end
  10. end
  11. end
  12. end
  13.  
  14.  
  15. function verifyLava(bucketIndex)
  16. if(bucketIndex == nil) then
  17. turtle.dropUp()
  18. return
  19. end
  20. end
  21.  
  22. function checkFuel()
  23.  
  24. turtle.select(getItemIndex("enderstorage:ender_storage"))
  25. turtle.digUp()
  26. turtle.placeUp()
  27. --Chest is deployed
  28.  
  29. turtle.suckUp()
  30.  
  31. while(turtle.getFuelLevel() < 1000) do
  32.  
  33. bucketIndex = getItemIndex("minecraft:lava_bucket")
  34. if(bucketIndex == nil) then
  35. turtle.suckUp()
  36. turtle.dropUp()
  37. else
  38. turtle.select(bucketIndex)
  39. turtle.refuel()
  40. turtle.dropUp()
  41. turtle.digUp()
  42. break
  43. end
  44. end
  45. end
  46.  
  47. checkFuel()
  48.  
  49. -- pastebin get 3nMw1mEr test
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement