Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --local chest = peripheral.wrap("bottom")
- local jarSide= "top"
- local aspect = "herba"
- local tSlot = 10
- --local cableSide = "bottom"
- function placeFullJar()
- local placed = false
- while placed == false do
- for slot = 1,16 do
- local content = turtle.getItemDetail(slot)
- if content ~= nil then
- if content.name == "Thaumcraft:BlockJarFilledItem" then
- print("full jar in slot"..slot)
- turtle.select(slot)
- placed = turtle.placeUp()
- print("Full jar placed.")
- return placed
- end
- end
- end
- sleep(8)
- end
- end
- while true do
- if turtle.detectUp() then
- local level = peripheral.call(jarSide,"getAspectCount",aspect)
- if level == 0 then
- print("Jar is empty")
- turtle.select(tSlot)
- turtle.digUp()
- turtle.dropDown(1)
- else
- print("Jar not empty yet...")
- sleep(8)
- end
- else
- print("No jar detected")
- placeFullJar()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment