Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local chest = peripheral.wrap "minecraft:dropper_172"
- local printer_side = "down"
- --[[
- printer slots:
- slot 1 = dye
- slots 2-7 = paper
- slots 8-14 = output
- ]]
- while true do
- for i = 8, 13 do -- extract printed output
- local moved = chest.pullItems(printer_side, i)
- if moved > 0 then print "Extracted a page!" end
- end
- for slot, item in pairs(chest.list()) do
- if item.name == "minecraft:paper" then
- local moved = chest.pushItems(printer_side, slot, 64, 2)
- if moved > 0 then print("Inserted paper!") end
- elseif item.name == "minecraft:dye" then
- local moved = chest.pushItems(printer_side, slot, 64, 1)
- if moved > 0 then print("Inserted dye!") end
- end
- end
- sleep(2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement