Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local e = 1
- function selectBlocks(s)
- if getBlockCount() ~= 0 then
- if tmp ~= nil then
- if tmp["name"] == "minecraft:netherrack" then
- local x = turtle.getItemCount()
- if x < 1 then
- turtle.select(s + 1)
- end
- end
- end
- else
- e = 2
- end
- end
- function bridge()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.placeDown()
- turtle.turnLeft()
- turtle.place()
- turtle.turnRight()
- turtle.turnRight()
- turtle.place()
- turtle.turnLeft()
- end
- function getBlockCount()
- local bc = 0
- local tmp
- for z = 1, 16, 1 do
- tmp = turtle.getItemDetail(t)
- if tmp ~= nil then
- if tmp["name"] == "minecraft:netherrack" then
- bc = bc + tmp["count"]
- end
- end
- end
- return bc
- end
- function equipPickaxe()
- local ed = 0
- local tmp
- shell.run("unequip", "left")
- shell.run("unequip", "right")
- for p = 1, 16, 1 do
- tmp = turtle.getItemDetail(p)
- if tmp ~= nil then
- if tmp["name"] == "minecraft:diamond_pickaxe" then
- turtle.equipLeft(p)
- ed = 1
- end
- end
- end
- if ed == 0 then
- e = 2
- print("Please put a Pickaxe into the Inventory")
- end
- end
- function doAll()
- shell.run("refuel", "all")
- equipPickaxe()
- turtle.select(1)
- while e == 1 do
- bridge()
- selectBlocks(turtle.getSelectedSlot())
- end
- end
- doAll()
Advertisement
Add Comment
Please, Sign In to add comment