Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wheat_chest = peripheral.wrap('front')
- function getNum(box, item)
- local dat = box.getStackInSlot(1)
- if dat and dat.display_name == item then
- return dat.qty
- end
- return 0
- end
- while true do
- for slot = 1, 27 do
- local dat = box.getStackInSlot(slot)
- if dat and dat.display_name == 'minecraft:wheat' and dat.qty >= 3 then
- for i = 1, 3 do
- turtle.select(i)
- turtle.suck(1)
- end
- turtle.craft()
- turtle.turnRight()
- for i = 1, 16 do
- turtle.select(i)
- turtle.drop()
- end
- turtle.turnLeft()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement