Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function craft_planks()
- slot = 1
- for i = 1, 16, 1 do
- turtle.select(i)
- item = turtle.getItemDetail()
- if item then
- if item.name ~= "minecraft:log" then
- turtle.drop()
- else
- turtle.transferTo(slot)
- slot = slot + 1
- end
- end
- end
- for i = 2, 16, 1 do
- turtle.select(i)
- turtle.drop()
- end
- turtle.craft()
- turtle.suck()
- end
- function craft_chest()
- craft_planks()
- slot = 1
- for i = 1, 16, 1 do
- turtle.select(i)
- item = turtle.getItemDetail()
- if item then
- if item.name ~= "minecraft:plank" then
- turtle.drop()
- else
- if item.count > 7
- turtle.select(1)
- turtle.transferTo(1, 1)
- turtle.transferTo(2, 1)
- turtle.transferTo(3, 1)
- turtle.transferTo(5, 1)
- turtle.transferTo(7, 1)
- turtle.transferTo(9, 1)
- turtle.transferTo(10, 1)
- turtle.transferTo(11, 1)
- turtle.select(16)
- turtle.craft(1)
- turtle.suck()
- end
- end
- end
- end
- if item.count > 7
- turtle.select(1)
- turtle.transferTo(1, 1)
- turtle.transferTo(2, 1)
- turtle.transferTo(3, 1)
- turtle.transferTo(5, 1)
- turtle.transferTo(7, 1)
- turtle.transferTo(9, 1)
- turtle.transferTo(10, 1)
- turtle.transferTo(11, 1)
- turtle.select(16)
- turtle.craft(1)
- turtle.suck()
- end
- end
- craft_planks()
- craft_chest()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement