View difference between Paste ID: Qjq5n70e and Ei7sxrdF
SHOW: | | - or go back to the newest paste.
1
while true do
2
  local m = peripheral.wrap("front")
3
  if m ~= nil then
4
    print("Jar detected")
5-
    local aspect = m.getAspects()
5+
    local aspectCount = m.getAspectCount("Herba")
6-
    local aspectCount = m.getAspectCount(aspect)
6+
7
      print("Jar is full, sending redstone signal.")
8
      redstone.setOutput("back", true)
9
      sleep(20)
10
      print("Stopping redstone signal.")
11
      redstone.setOutput("back", false)
12
    else
13
      print("Jar isn't full. It only has " .. aspectCount .. ".")
14
    end
15
  else 
16
    print("No Jar, check again in 60.")
17
  end
18
  sleep(60)
19
end