Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- generic add floor to cleared chunk
- height=4
- mats=0
- slot=1
- flip=1
- alternate=0 -- set
- -- position turtle on right side of room in the corner facing wall, it'll dig down and proceed to zig zag the floor 'height' blocks down
- -- (Height+1 to offset the floor we just passed through)
- for x=1,height+1 do
- turtle.digDown()
- turtle.down()
- end
- for x=1,16 do
- turtle.digDown()
- turtle.placeDown()
- for y=1,15 do -- since the first slot is occupied by the turtle's first move into the row
- -- assumes first four slots are filled with 64 blocks each
- -- with alternate=1 you need 8 slots of 32 (generally with alternating color scheme i.e. blk/wht, red/green, etc)
- mats=mats+1
- if alternate==2 then
- slot=slot-4
- alternate=1
- print("Color 2 selecting slot ",slot)
- elseif alternate==1 then
- alternate=2
- slot=slot+4
- print("Color 1 selecting slot ",slot)
- else -- alternate=0
- print("No color alternation, staying on slot ",slot," placing item ",mats)
- end
- -- turtle.select(slot)
- if mats==64 then
- mats=0
- slot=slot+1
- -- turtle.select(slot)
- end
- turtle.select(slot) -- consolidate the two above
- turtle.digUp()
- turtle.dig()
- while not turtle.forward() do -- covers unlikely scenario where there's a row of gravel/sand)
- turtle.dig()
- end
- turtle.digDown() --seems to skip this on the end of the row
- turtle.placeDown()
- end
- if flip==0 then
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- flip=1
- else
- flip=0
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- end
- turtle.placeDown()
- end
Add Comment
Please, Sign In to add comment