Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- local m = peripheral.wrap("front")
- if m ~= nil then
- print("Jar detected")
- local aspectCount = m.getAspectCount("Herba")
- if aspectCount == 64 then
- print("Jar is full, sending redstone signal.")
- redstone.setOutput("back", true)
- sleep(20)
- print("Stopping redstone signal.")
- redstone.setOutput("back", false)
- else
- print("Jar isn't full. It only has " .. aspectCount .. ".")
- end
- else
- print("No Jar, check again in 60.")
- end
- sleep(60)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement