Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local scanner = device["plethora:scanner"]
- local Event = require("opus.event")
- local function checkForMelon()
- local scanResults = scanner.scan()
- for _,block in next, scanResults do
- if block.name == "minecraft:melon_block" then
- return true,{
- x = block.x,
- y = block.y,
- z = block.z
- }
- end
- end
- end
- local function digFirstMelonFound()
- local found, coords = checkForMelon()
- if found then
- turtle.digDownAt(coords)
- else
- print("idle")
- end
- end
- Event.onInterval(5,digFirstMelonFound)
- Event.pullEvents()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement