Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local placeSlot = 1
- local torchSlot = 13
- while true do
- for i=1,7 do
- if turtle.detect() then
- turtle.dig()
- end
- turtle.forward()
- if turtle.detectUp() then
- turtle.digUp()
- end
- turtle.select(placeSlot)
- if turtle.getItemCount() <= 1 then
- while turtle.getItemCount() <= 1 or turtle.getItemDetail().name == "minecraft:torch" do
- if turtle.getSelectedSlot() < 16 then
- turtle.select(turtle.getSelectedSlot()+1)
- else
- turtle.select(1)
- end
- end
- placeSlot = turtle.getSelectedSlot()
- end
- if not turtle.detectDown() then
- turtle.select(placeSlot)
- turtle.placeDown()
- end
- end
- turtle.select(torchSlot)
- if turtle.getItemCount() <= 1 then
- while turtle.getItemCount() <= 1 or turtle.getItemDetail().name ~= "minecraft:torch" do
- if turtle.getSelectedSlot() < 16 then
- turtle.select(turtle.getSelectedSlot()+1)
- else
- turtle.select(1)
- end
- end
- torchSlot = turtle.getSelectedSlot()
- end
- turtle.select(torchSlot)
- turtle.placeUp()
- sleep(2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement