Advertisement
Maxwelljonez

MJZ Advanced Cobblestone Generator

Aug 14th, 2023 (edited)
847
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --{program="MJZ Cobblegen",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.0"
  23. local cPrgName  ="MJZ CobbleGen"
  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.         select(1)
  40.         turtle.dig()
  41.     end
  42. end
  43.  
  44. local function dropstacks()
  45.     for i=1,16 do
  46.         turtle.select(i)
  47.         turtle.dropUp()
  48.     end
  49. end
  50.  
  51. ---------------------------------------
  52. ---- run  -----------------------------
  53. ---------------------------------------
  54. while true do
  55.     mine()
  56.     itemcount1 = turtle.getItemCount(1)
  57.     if itemcount1 == 64 then
  58.         print("| Dropping stacks")
  59.         print("| Please wait...")
  60.         dropstacks()
  61.     end
  62.     itemcount15 = turtle.getItemCount(15)
  63.     if itemcount15 == 64 then
  64.         print("| Turtle full .. Sleeping " ..sleepTime.. "")
  65.     end
  66. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement