Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function voidInv()
- turtle.select(1)
- for i=1,16 do
- turtle.select(i)
- turtle.drop()
- end
- end
- function isBasalt()
- local blockID
- local success, data = turtle.inspectDown()
- if success then
- blockID = data.name
- end
- if data.name == "minecraft:basalt" then
- return true
- else
- return false
- end
- end
- function mine()
- turtle.select(1)
- while not isBasalt() do
- turtle.select(1)
- end
- turtle.digDown()
- end
- function craft()
- local inv = {11, 12, 15, 16}
- for i=1,2 do
- turtle.transferTo(inv[1], 1)
- turtle.transferTo(inv[2], 1)
- turtle.transferTo(inv[3], 1)
- turtle.transferTo(inv[4], 1)
- turtle.craft()
- end
- end
- function uppies()
- turtle.select(1)
- turtle.dropUp()
- end
- local function main()
- while redstone.getInput("back") do
- for i = 1, 4 do
- mine()
- end
- craft()
- uppies()
- end
- os.pullEvent("redstone")
- voidInv()
- end
- voidInv()
- while true do
- main()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement