Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- redstone off -> set slot1 item
- -- redstone on -> set slot2 item
- -- 1. Set the slot1 item into the forward chest.
- -- 2. Turtle's inventory: slot1 is empty, and slot2 has an item.
- -- 3. Execute this program.
- RS_SIDE = 'top'
- while true do
- if (not rs.getInput(RS_SIDE)) and (turtle.getItemSpace(1) ~= 64) and (turtle.getItemSpace(2) == 64) then
- turtle.select(2)
- turtle.suck()
- turtle.select(1)
- turtle.drop()
- elseif rs.getInput(RS_SIDE) and (turtle.getItemSpace(2) ~= 64) and (turtle.getItemSpace(1) == 64) then
- turtle.select(1)
- turtle.suck()
- turtle.select(2)
- turtle.drop()
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement