Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local signalSide = "left"
- local drum = peripheral.wrap("front")
- --local rTank = peripheral.wrap("back")
- --local limit = -256000
- --local limit = -3500000
- local tank, rtank
- while true do
- --rtank = rTank.getTankInfo("in")
- --if(rtank and rtank[1] and rtank[1].amount-rtank[1].capacity >= limit) then
- if not turtle.detect() then
- print("Trying to place new drum.")
- --encourage block placer to do his job
- redstone.setOutput(signalSide,true)
- sleep(1)
- redstone.setOutput(signalSide,false)
- end
- --end
- if turtle.detect() then
- drum = peripheral.wrap("front")
- if drum then
- tank = drum.getTankInfo("in")
- if(tank and tank[1] and tank[1].amount-tank[1].capacity>=0) then
- turtle.dig()
- redstone.setOutput(signalSide,true)
- sleep(1)
- redstone.setOutput(signalSide,false)
- end
- end
- end
- sleep(10)
- end
Advertisement
Add Comment
Please, Sign In to add comment