Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Compression program.
- -- Fills 3x3 grid with items and crafts.
- -- Intended for crafting of things like compressed cobblestone, redstone blocks, etc.
- -- Algorithm:
- -- While able to pull stacks from above inventory:
- while turtle.suckUp() do
- turtle.select(16)
- -- Distribute stack across 3x3 grid.
- stackSize = turtle.getItemCount(16)
- distSize = (stackSize-(stackSize % 9)) / 9
- if stackSize >= 9 then
- turtle.transferTo(1, distSize)
- turtle.transferTo(2, distSize)
- turtle.transferTo(3, distSize)
- turtle.transferTo(5, distSize)
- turtle.transferTo(6, distSize)
- turtle.transferTo(7, distSize)
- turtle.transferTo(9, distSize)
- turtle.transferTo(10, distSize)
- turtle.transferTo(11, distSize)
- end
- turtle.select(16)
- turtle.drop()
- turtle.craft()
- -- Place contents of slot 16 into inventory in front of turtle.
- turtle.drop()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement