Advertisement
kunyuu

Computercraft Ice Pure Daisy

Feb 18th, 2021
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.78 KB | None | 0 0
  1. --Snow Machine
  2. --Written for Pure Daisy Automation
  3. --May also need some fixes to pathing, not sure
  4.  
  5. snow = "minecraft:snow_block"
  6.  
  7. function checkMaterial(description)
  8.     if description == snow then
  9.         return true
  10.     else
  11.         return false
  12.     end
  13. end
  14.  
  15. function mineSnow()
  16.     turtle.turnLeft()
  17.     blockPresent, item = turtle.inspect()
  18.     if checkMaterial(item.name) then
  19.         turtle.dig()
  20.     end
  21.     turtle.turnRight()
  22. end
  23.  
  24. function main()
  25.     while true do
  26.         if (turtle.getFuelLevel() == 0) then
  27.             turtle.refuel()
  28.         end
  29.        
  30.         counter = 0
  31.        
  32.         for counter=0, 5 do
  33.             mineSnow()
  34.             turtle.forward()
  35.         end
  36.         turtle.turnLeft()
  37.         sleep(5)
  38.     end
  39. end
  40.  
  41. main()
  42.    
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement