Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- chestFull = false
- function fillSlot(slot)
- turtle.select(slot)
- while turtle.getItemCount() < 64 do
- turtle.suck(64-turtle.getItemCount())
- end
- end
- function fillSlotFromUp(slot)
- turtle.select(slot)
- while turtle.getItemCount() < 64 do
- turtle.suckUp(64-turtle.getItemCount())
- end
- end
- function emptyInventory()
- for i=1,16 do
- turtle.select(i)
- item = turtle.getItemDetail()
- if item and item.name == "ic2:blockgenerator" then
- dropped, message = turtle.dropDown()
- if not dropped then
- chestFull = true
- return
- else
- chestFull = false
- end
- end
- end
- end
- function craftPanel()
- fillSlot(1)
- fillSlot(3)
- fillSlot(6)
- turtle.turnLeft()
- fillSlot(2)
- fillSlot(5)
- fillSlot(7)
- fillSlotFromUp(9)
- fillSlotFromUp(11)
- turtle.turnLeft()
- turtle.turnLeft()
- fillSlot(10)
- turtle.craft()
- turtle.turnLeft()
- emptyInventory()
- end
- while true do
- while not chestFull do
- emptyInventory()
- if not chestFull then
- craftPanel()
- end
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement