Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Function to build a pillar
- function buildPillar(newSlot)
- local blockSlot = newSlot
- local waterSlot = 16 -- Last slot containing water
- height = 0
- blockCount = turtle.getItemCount(blockSlot)
- while turtle.getItemCount(blockSlot) > 0 do
- turtle.select(blockSlot)
- turtle.up()
- turtle.placeDown()
- height = height + 1
- end
- -- Place water at the top
- if blockCount ~= 0 then
- turtle.select(waterSlot)
- turtle.placeUp()
- os.sleep(1)
- turtle.placeUp()
- turtle.select(blockSlot)
- for i = 1, height do
- turtle.digDown()
- turtle.down()
- end
- end
- end
- slot = 1
- while slot ~= 16 do
- buildPillar(slot)
- slot = slot + 1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement