Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- turtle.refuel()
- geo = peripheral.wrap("left")
- function waitForCooldown()
- local cooldown,cr = geo.getOperationCooldown("scanBlocks")
- if cooldown == nil then
- print(cr)
- return
- end
- if cooldown > 0 then
- while true do
- cooldown = geo.getOperationCooldown("scanBlocks")
- print("cooldown: " .. tostring(cooldown) .. "s")
- sleep(0.5)
- if cooldown <= 0 then
- break
- end
- end
- end
- end
- ores,err = geo.chunkAnalyze()
- if ores == nil then
- print(err)
- else
- if ores["allthemodium:allthemodium_ore"] ~= nil then
- print("found")
- loc,err2 = geo.scan(16)
- if loc == nil then
- print(err2)
- else
- for k,v in pairs(loc) do
- if v.name == "allthemodium:allthemodium_ore" then
- print("@"+tostring(v.x)+","+tostring(v.y)+","+tostring(v.z))
- end
- end
- end
- else
- print("no")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement