public Set<ItemIdentifier> getSpecificInterests() {
Set<ItemIdentifier> l1 = new TreeSet<ItemIdentifier>();
//if we don't have a pointed inventory we can't be interested in anything
if(getSneakyInventory(false) == null) return l1;
for (int moduleIndex = 0; moduleIndex < this.getChassiSize(); moduleIndex++){
LogisticsModule module = _module.getSubModule(moduleIndex);
if(module!=null && module.interestedInAttachedInventory()) {
IInventoryUtil inv = getSneakyInventory(false);
Set<ItemIdentifier> items = inv.getItems();
l1.addAll(items);
//also add tag-less variants ... we should probably add a module.interestedIgnoringNBT at some point
for(ItemIdentifier id:items) {
l1.add(id.getIgnoringNBT());
}
boolean modulesInterestedInUndamged=false;
for (int i = 0; i < this.getChassiSize(); i++) {
if( _module.getSubModule(moduleIndex).interestedInUndamagedID()){
modulesInterestedInUndamged=true;
break;
}
}
if(modulesInterestedInUndamged) {
for(ItemIdentifier id:items){
l1.add(id.getUndamaged());
}
}
break; // no need to check other modules for interest in the inventory, when we know that 1 already is.
}
}
for (int i = 0; i < this.getChassiSize(); i++){
LogisticsModule module = _module.getSubModule(i);
if(module!=null) {
Collection<ItemIdentifier> current = module.getSpecificInterests();
if(current!=null)
l1.addAll(current);
}
}
return l1;