This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
JUERG660's profile picture

get for many is in an ME-System

Started by JUERG660, 05 September 2016 - 05:05 PM
JUERG660 #1
Posted 05 September 2016 - 07:05 PM
Hi guys,

i am looking for an Code . I want to know how many ( for example) Cobblestone is in my ME-System.

When there are 3k in my System i want to give out a Redstone signal. Is anybody here how can realize this ?

I am not able to programm this.

Sry for my English.


Thanks a lot , Jürgen
Lyqyd #2
Posted 05 September 2016 - 07:27 PM
Is there no longer a level emitter block in the AE mod?

Moved to Ask a Pro.
CCJJSax #3
Posted 06 September 2016 - 03:05 AM
I know you can do it with peripherals++ but I'm unsure with just ae2.
Dog #4
Posted 06 September 2016 - 04:30 AM
Is there no longer a level emitter block in the AE mod?
According to ae-mod.info there is a level emitter for AE2. That would be the most straightforward solution.
CCJJSax #5
Posted 06 September 2016 - 09:08 AM
The only problem with the level emitter would be that it takes a channel on the AE network.
With peripherals++ you can use the ME bridge and use this

ME = peripheral.wrap(side)
function numberOfItems(id, dmg)
 local items = ME.getItemsInSystem()
  for i = 1, #items do
   if items[i].fingerprint.id == id and items[i].fingerprint.dmg == dmg then
    return items[i].size
   end
  end
 end
as for just AE this is how you do it. first wrap an interface.

face = peripheral.wrap("left")
function getItemsInME(id)
 for k,v in pairs(face.getAvailableItems()) do
  if v.fingerprint.id == id then
   print("there is "..v.size.." "..v.fingerprint.id)
  end
 end
end
getItemsInME("minecraft:cobblestone")
Edited on 06 September 2016 - 07:12 AM