Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- chestFull = false
- function fillSlots(start, finish)
- for i=start,finish do
- turtle.select(i)
- while turtle.getItemCount() < 64 do
- turtle.suck(64-turtle.getItemCount())
- end
- end
- end
- function emptyInventory()
- for i=1,16 do
- turtle.select(i)
- item = turtle.getItemDetail()
- if item and item.name == "ic2:itemcable" then
- dropped, message = turtle.dropDown()
- if not dropped then
- chestFull = true
- return
- else
- chestFull = false
- end
- end
- end
- end
- function craftCircuit()
- fillSlots(1, 3)
- fillSlots(9, 11)
- turtle.turnLeft()
- fillSlots(5, 7)
- turtle.turnRight()
- turtle.craft()
- end
- while true do
- while redstone.getInput("back") and not chestFull do
- emptyInventory()
- if not chestFull then
- craftCircuit()
- end
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement