Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- modem = peripheral.find("modem")
- chest1 = peripheral.wrap("minecraft:chest_9")
- chest2 = peripheral.wrap("minecraft:chest_10")
- out = peripheral.wrap("minecraft:chest_12")
- turt = modem.getNameLocal()
- t = turtle
- -- main loop
- while 1 do
- t.craft(4)
- chest2.pushItems(turt, 1, 1) -- get cobble from chest and to slot on int eh turtle
- chest1.pushItems(turt, 1, 1) -- get quartz from chicken and send to slot 2 on the turtle
- item3 = t.getItemCount(3)
- item4 = t.getItemCount(4)
- if (item3 > 0) then
- item = t.getItemDetail(3).name
- if (item == "minecraft:quartz") then
- t.select(3)
- t.transferTo(6, item3)
- print("quartz detected")
- elseif (item == "minecraft:cobblestone") then
- t.select(3)
- t.transferTo(5, item3)
- print("cobble detected")
- elseif (item == "minecraft:diorite") then
- print("diorite detected")
- t.select(3)
- out.pullItems(turt, 3)
- t.select(1)
- else
- print("Error: cannot add L to var 'ratio'")
- end
- end
- if (item4 > 0) then
- item = t.getItemDetail(4).name
- if (item == "minecraft:quartz") then
- t.select(4)
- t.transferTo(6, item4)
- print("quartz detected")
- elseif (item == "minecraft:cobblestone") then
- t.select(4)
- t.transferTo(5, item4)
- print("cobble detected")
- elseif (item == "minecraft:diorite") then
- print("diorite detected")
- t.select(4)
- out.pullItems(turt, 4)
- t.select(1)
- else
- print("Error: cannot add var 'L' to var 'ratio'")
- end
- end
- end