Advertisement
Maxwelljonez

MJZ Simple Cobblestone Generator

Aug 14th, 2023 (edited)
815
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.33 KB | Gaming | 0 0
  1. --{program="MJZ Cobblefarm",version="1.0"}
  2. -- WIP !
  3. ---------------------------------------
  4. -- 14.8.23   v1.0 initial
  5. ---------------------------------------
  6. -- ToDo:
  7. -- Farm Cobble, fill chest, return values on screen
  8.  
  9. ---------------------------------------
  10. ---- DESCRIPTION ----------------------
  11. ---------------------------------------
  12. --[[
  13.  
  14. A simple but yet expandle cobble generator
  15.  
  16. --]]
  17.  
  18. ---------------------------------------
  19. ---- PARAMETERS -----------------------
  20. ---------------------------------------
  21.  
  22. local cVersion  ="1.5"
  23. local cPrgName  ="MJZ FarmBot"
  24. local debugging=false
  25. local slotFuel=16   -- where to put fuel
  26. local minFuel=0   -- the minimal amount of fuel required
  27. local sleepTime=5
  28.  
  29. ---------------------------------------
  30. ---- VARIABLES ------------------------
  31. ---------------------------------------
  32.  
  33. ---------------------------------------
  34. -- BASIC FUNCTIONS FOR TURTLE CONTROL -
  35. ---------------------------------------
  36.  
  37. local function mine()
  38.     if turtle.detect() then
  39.         turtle.dig()
  40.     end
  41. end
  42.  
  43.  
  44. ---------------------------------------
  45. ---- run  -----------------------------
  46. ---------------------------------------
  47. while true do
  48.     mine()
  49.     itemcount = turtle.getItemCount(16)
  50.     if itemcount == 64 then
  51.         sleep(sleepTime)
  52.         print("| Waiting " ..sleepTime.. "")
  53.     end
  54. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement