Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- coblestone generator digging turtle
- --- by largenumbergoeshere https://www.curseforge.com/members/largenumbergoeshere/
- function isFull()
- if turtle.getItemCount(12) >32 then
- -- turtle is almost full so return true
- return true
- else
- -- turtle is not so full
- return false
- end
- end
- function doChecks()
- local defaultSlot = 1
- local slot = turtle.getSelectedSlot()
- if slot ~= defaultSlot then
- turtle.select(defaultSlot)
- end
- if isFull() then
- print("turtle is full. Paused digging")
- while isFull() do
- sleep(1)
- write(".")
- end
- end
- end
- local doChecksInt = 0
- local interval = 10
- function doChecksIf()
- doChecksInt = doChecksInt + 1
- if doChecksInt%interval == 0 then
- doChecks()
- end
- end
- function digIfBlock()
- if turtle.detect() then
- turtle.dig()
- else
- end
- end
- while true do
- doChecksIf()
- digIfBlock()
- end
Add Comment
Please, Sign In to add comment