Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- rotatory transfer
- -- moves blocks from one direction to another by turning
- -- expects a configuration with an opening (air) a left turn from first target
- -- 2
- -- 1 t ?
- -- _
- local reverse_flow = false -- change the flow of blocks from 1 <- 2 to 1 -> 2
- local reverse_side = false -- flip the spin direction so the air is to the right side
- local first = turtle.drop
- local second = turtle.suck
- local right = turtle.turnRight
- local left = turtle.turnLeft
- local temp
- if reverse_flow then
- temp = first
- first = second
- second = temp
- end
- if reverse_side then
- temp = right
- right = left
- left = temp
- end
- -- reset direction
- while turtle.detect() do right() end
- while not turtle.detect() do right() end
- -- start the transfer
- while true do
- first()
- right()
- second()
- left()
- sleep(0)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement