local ec = peripheral.find "ender_chest" local ecinv = peripheral.find "minecraft:ender chest" local z = ... if z then ec.setFrequency(tonumber(z, 16)) return end for i = 0, 0xFFF do ec.setFrequency(i) local count = 0 for _, s in pairs(ecinv.list()) do count = count + s.count end if count > 0 then print(os.date "!%X", table.concat(ec.getFrequencyColors(), "/"), ("0x%03x"):format(i), count) end sleep(0.1) end