Advertisement
Julianiolo

is

Nov 27th, 2021
975
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.04 KB | None | 0 0
  1. turtle.refuel()
  2. geo = peripheral.wrap("left")
  3.  
  4.  
  5. function waitForCooldown()
  6.     local cooldown,cr = geo.getOperationCooldown("scanBlocks")
  7.     if cooldown == nil then
  8.         print(cr)
  9.         return
  10.     end
  11.  
  12.     if cooldown > 0 then
  13.         while true do
  14.             cooldown = geo.getOperationCooldown("scanBlocks")
  15.             print("cooldown: " .. tostring(cooldown) .. "s")
  16.             sleep(0.5)
  17.             if cooldown <= 0 then
  18.                 break
  19.             end
  20.         end
  21.     end
  22. end
  23.  
  24.  
  25. ores,err = geo.chunkAnalyze()
  26. if ores == nil then
  27.     print(err)
  28. else
  29.     if ores["allthemodium:allthemodium_ore"] ~= nil then
  30.         print("found")
  31.         loc,err2 = geo.scan(16)
  32.         if loc == nil then
  33.             print(err2)
  34.         else
  35.             for k,v in pairs(loc) do
  36.                 if v.name == "allthemodium:allthemodium_ore" then
  37.                     print("@"+tostring(v.x)+","+tostring(v.y)+","+tostring(v.z))
  38.                 end
  39.             end
  40.         end
  41.     else
  42.         print("no")
  43.     end
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement