Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local geolyzer = component.proxy(component.list("geolyzer")())
- local rs = component.proxy(component.list("redstone")())
- --local component = require("component")
- --local geolyzer = component.geolyzer
- --local rs = component.redstone
- function sleep(timeout)
- checkArg(1, timeout, "number", "nil")
- local deadline = computer.uptime() + (timeout or 0)
- repeat
- computer.pullSignal(deadline - computer.uptime())
- until computer.uptime() >= deadline
- end
- while true do
- local scan, msg = geolyzer.analyze(2)
- if not scan then
- error(msg)
- end
- if (scan["name"] == "minecraft:air") then
- rs.setOutput(3, 0)
- else
- rs.setOutput(3, 15)
- end
- sleep(5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement